From patchwork Thu Jul 15 10:02:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 12379743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3012C07E96 for ; Thu, 15 Jul 2021 10:03:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D12D610CB for ; Thu, 15 Jul 2021 10:03:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241090AbhGOKFz (ORCPT ); Thu, 15 Jul 2021 06:05:55 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:59564 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240948AbhGOKFz (ORCPT ); Thu, 15 Jul 2021 06:05:55 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 937582292E; Thu, 15 Jul 2021 10:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1626343381; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TTJiLS1SqZqXUpzarqa9iMdem2gom5jB+GbHREAEndo=; b=ompT4TVYfygAeL+16TklyknkJ3GUtUmDQsyogyYLrTVjJ2eL+yvX/rBf2atpPPjEuSq9Zk r1LEUKLtFlMOKIUHjQodm17AYdAsLNjTa5pF7GmkqLsTSmXG9AGl1Q8H4kbSSQsBPd9okJ e/DIBL6GeyeqIWr/wU0Nl3GVg27Phgo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1626343381; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TTJiLS1SqZqXUpzarqa9iMdem2gom5jB+GbHREAEndo=; b=F5iMgUiYf/qaamh8p7kjtDd9iEeEXzwij4iXp+hEdkw3P7nMlKAvs0+1HQ/rjYeBu7iIAz Nmxwvqet7ihLpADA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 634FD13C31; Thu, 15 Jul 2021 10:03:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id XlNAF9UH8GCMEQAAMHmgww (envelope-from ); Thu, 15 Jul 2021 10:03:01 +0000 From: Thomas Zimmermann To: paul@crapouillou.net, airlied@linux.ie, daniel@ffwll.ch, sam@ravnborg.org Cc: linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH v2] drm/ingenic: Convert to Linux IRQ interfaces Date: Thu, 15 Jul 2021 12:02:58 +0200 Message-Id: <20210715100258.6638-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. This patch also fixes a bug where the driver didn't release the IRQ. v2: * automatically release IRQ via devm_request_irq() (Paul) * mention the bugfix (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Reviewed-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index c296472164d9..857ed070b21b 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -799,8 +798,6 @@ static const struct drm_driver ingenic_drm_driver_data = { .fops = &ingenic_drm_fops, .gem_create_object = ingenic_drm_gem_create_object, DRM_GEM_CMA_DRIVER_OPS, - - .irq_handler = ingenic_drm_irq_handler, }; static const struct drm_plane_funcs ingenic_drm_primary_plane_funcs = { @@ -1098,7 +1095,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components) encoder->possible_clones = clone_mask; } - ret = drm_irq_install(drm, irq); + ret = devm_request_irq(dev, irq, ingenic_drm_irq_handler, 0, drm->driver->name, drm); if (ret) { dev_err(dev, "Unable to install IRQ handler\n"); return ret;