From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 167E1C4338F for ; Sun, 1 Aug 2021 19:58:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C184561040 for ; Sun, 1 Aug 2021 19:58:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C184561040 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:Date:Message-ID:Subject:From:References:To:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LLtRnBFL1cwEiwnFJa6jUpnfk3gGbu3HDtCyGm2+t0c=; b=rcJFfukQ39w4oTfNTritL7KjHR 5PMRVA/pWdvd4+mVsgKXv4UFLeYFePzRozgFbv3a8luBCLP3WxqolB4jpeGveM6yOAOQSVWl9q8Gu CKOLLE650hbPDAvwuqi5edyOl9XoMzIPOr7PZ6ZGuAUt7ZFAL0PIzjs30K8kXbD81cxtVeBG9cOhk dTVR2fNmGr5q8/OE6ctK5b0cDi25NMoxH+DaDltWeQaPofJrxrlEc2dfGVeXmN+JeE5ZA/1PZsMKa XeRK8WPf7AjVt08a28r4sOB4B8Pl9xiJE1siDQdBsvASwNWdxpakiqOVOX4Ta6rIa8xZ4Ep4S+hae RjXOQIjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAHZT-00E79U-IJ; Sun, 01 Aug 2021 19:56:27 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAHZP-00E793-AG for linux-arm-kernel@lists.infradead.org; Sun, 01 Aug 2021 19:56:25 +0000 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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-out2.suse.de (Postfix) with ESMTPS id 002381FEA9; Sun, 1 Aug 2021 19:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627847779; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U+NnGC7CJLacokVANmN7ic2V4ps6/e94vckxcS1KJcA=; b=DK6buZSCQkrXdg1Vkj91UtFxATcaDM617qveaS24/kmVPLWtgaRYUDJgCC5tfoK3uLzoSE Dt/Z+m4YNZTVSkOGVWuGX0a5YTGMCSbxTBpgVzVbPsJYk3MCZjzSyBBXixAwIjlJGl8+YD IrU/vCzrNBTQvhlJyDiK41uZUBwi6DE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627847779; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U+NnGC7CJLacokVANmN7ic2V4ps6/e94vckxcS1KJcA=; b=sYTLilX4dvmt8x4XRFujnRm6HLHKa7AtwW1QByKYYb3VdDR6Ydvc4gv1hYglPV9SThePvc m8c/xhKBsMzTziBw== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 43DAD1369B; Sun, 1 Aug 2021 19:56:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id 3p2UDmL8BmHgBQAAGKfGzw (envelope-from ); Sun, 01 Aug 2021 19:56:18 +0000 To: Sam Ravnborg References: <20210727182721.17981-1-tzimmermann@suse.de> From: Thomas Zimmermann Subject: Re: [PATCH 00/14] drm: Make DRM's IRQ helpers legacy Message-ID: Date: Sun, 1 Aug 2021 21:56:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210801_125623_566595_850BED9F X-CRM114-Status: GOOD ( 33.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, liviu.dudau@arm.com, stefan@agner.ch, amd-gfx@lists.freedesktop.org, anitha.chrisanthus@intel.com, patrik.r.jakobsson@gmail.com, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, daniel@ffwll.ch, edmund.j.dea@intel.com, s.hauer@pengutronix.de, alison.wang@nxp.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, dri-devel@lists.freedesktop.org, sean@poorly.run, linux-arm-kernel@lists.infradead.org, tomba@kernel.org, bbrezillon@kernel.org, jyri.sarha@iki.fi, christian.koenig@amd.com, robdclark@gmail.com, kernel@pengutronix.de, alexander.deucher@amd.com, shawnguo@kernel.org, brian.starkey@arm.com Content-Type: multipart/mixed; boundary="===============3659156267997683840==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============3659156267997683840== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MBU0Z03ywHqTmMHjoTTP5JnuitAObvxI4" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MBU0Z03ywHqTmMHjoTTP5JnuitAObvxI4 Content-Type: multipart/mixed; boundary="ZWB90fKUSLppcAn3zi6q0dP71wt9gJEfo"; protected-headers="v1" From: Thomas Zimmermann To: Sam Ravnborg Cc: daniel@ffwll.ch, airlied@linux.ie, alexander.deucher@amd.com, christian.koenig@amd.com, liviu.dudau@arm.com, brian.starkey@arm.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, stefan@agner.ch, alison.wang@nxp.com, patrik.r.jakobsson@gmail.com, anitha.chrisanthus@intel.com, robdclark@gmail.com, edmund.j.dea@intel.com, sean@poorly.run, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, jyri.sarha@iki.fi, tomba@kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Message-ID: Subject: Re: [PATCH 00/14] drm: Make DRM's IRQ helpers legacy References: <20210727182721.17981-1-tzimmermann@suse.de> In-Reply-To: --ZWB90fKUSLppcAn3zi6q0dP71wt9gJEfo Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Sam Am 31.07.21 um 20:50 schrieb Sam Ravnborg: > Hi Thomas, >=20 > On Tue, Jul 27, 2021 at 08:27:07PM +0200, Thomas Zimmermann wrote: >> DRM's IRQ helpers are only helpful for old, non-KMS drivers. Move >> the code behind CONFIG_DRM_LEGACY. Convert KMS drivers to Linux >> IRQ interfaces. >> >> DRM provides IRQ helpers for setting up, receiving and removing IRQ >> handlers. It's an abstraction over plain Linux functions. The code >> is mid-layerish with several callbacks to hook into the rsp drivers. >> Old UMS driver have their interrupts enabled via ioctl, so these >> abstractions makes some sense. Modern KMS manage all their interrupts >> internally. Using the DRM helpers adds indirection without benefits. >> >> Most KMs drivers already use Linux IRQ functions instead of DRM's >> abstraction layer. Patches 1 to 12 convert the remaining ones. >> The patches also resolve a bug for devices without assigned interrupt >> number. DRM helpers don't test for IRQ_NOTCONNECTED, so drivers do >> not detect if the device has no interrupt assigned. >> >> Patch 13 removes an unused function. >> >> Patch 14 moves the DRM IRQ helpers behind CONFIG_DRM_LEGACY. Only >> the old non-KMS drivers still use the functionality. >> >> Thomas Zimmermann (14): >> drm/amdgpu: Convert to Linux IRQ interfaces >> drm/arm/hdlcd: Convert to Linux IRQ interfaces >> drm/atmel-hlcdc: Convert to Linux IRQ interfaces >> drm/fsl-dcu: Convert to Linux IRQ interfaces >> drm/gma500: Convert to Linux IRQ interfaces >> drm/kmb: Convert to Linux IRQ interfaces >> drm/msm: Convert to Linux IRQ interfaces >> drm/mxsfb: Convert to Linux IRQ interfaces >> drm/radeon: Convert to Linux IRQ interfaces >> drm/tidss: Convert to Linux IRQ interfaces >> drm/tilcdc: Convert to Linux IRQ interfaces >> drm/vc4: Convert to Linux IRQ interfaces >> drm: Remove unused devm_drm_irq_install() >> drm: IRQ midlayer is now legacy >=20 > With the irq_enabled confusion out of the way I want to re-address two > issues here that I know you have answered but I am just not convinced. >=20 > 1) IRQ_NOTCONNECTED >=20 > We do not have this check in drm_irq today and we should avoid spreadin= g > it all over. We are either carrying it forever or we wil lsee patches > floating in to drop the check again. > The current use in the kernel is minimal: > https://elixir.bootlin.com/linux/latest/A/ident/IRQ_NOTCONNECTED >=20 > So as a minimum drop it from atmel_hlcdc and preferably from the rest a= s > it is really not used. (Speaking as atmel_hlcdc maintainer) I'll drop it from atmel_hlcdc then. But saying that it's not used is not correct. At least radeon an gma500=20 handle PCI-based devices and BIOSes often had the option of disabling=20 the rsp graphics interrupts. >=20 >=20 > 2) devm_request_irq() >=20 > We are moving towards managed allocation so we do not fail to free > resources. And an irq has a lifetime equal the device itself - so an > obvious cnadidate for devm_request_irq. > If we do not introduce it now we will see a revisit of this later. > I can be convinced to wait with this as we will have to do much more in= > each driver, but I cannot see any good arguments to avoid the more > modern way to use devm_request_irq. I'll change this in atmel_hdlcd and maybe I can find trivial cases where = devm_request_irq() can be used. But drivers that had an uninstall=20 callback before should not have the cleanup logic altered by a patch as=20 this one. I suspect that most of the IRQ cleanup is actually a vblank cleanup and should be done in response to=20 drm_vblank_init(). But that's again not something for this patchset=20 here. We cannot change multiple things at once and still expect any of=20 it to work. I welcome the use of devm_ et al. But these changes are better done in a = per-driver patchset that changes all of the driver to managed release. Best regards Thomas >=20 > Sam >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --ZWB90fKUSLppcAn3zi6q0dP71wt9gJEfo-- --MBU0Z03ywHqTmMHjoTTP5JnuitAObvxI4 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEExndm/fpuMUdwYFFolh/E3EQov+AFAmEG/GEFAwAAAAAACgkQlh/E3EQov+A9 cw/+IEz+W6K/8wOb9uXueI0jm0rdu2FMaG5qIevMl+qQOSrRBnMsDPG4Hir4RQKzWH9JwyCL2es9 qAQ2tbU/89oubj3yOHCWY6/v1nxj92/DU86PJiPpwCUw6Q3p4WNRlChbZTB1DF2KlnSoGPNCuDwk 2r8N+PiVth2fZWsaYtGlkvVxxOKHVnUFxez5nIHujTJUDtMByL05iPXmM14MK7AEcFvbvdHDTxax aWhfBU0CaZsS1yxyCiwF+pb9u4IxIZy/wMXVM4VtqxX9ambseEfRyxpIWqG+xMRUbGhcn0BScHZv SWMr+tfebvA3xLFWlTq0F6mP4IRm2Bl0AQafOcQtDvzFplcBM9Ex0txc4tROzn10A1EXvs+TJj+O 6ovgrs/nRlsbusHlzH/tN3EPVj+LmyHa1lSbuP3yZ+wcInTlqzjVX/ssTqxV9iCbEu4zFtI8ZR5d NkVungaeOZXy8Nd51G5NEEazGoAfTm0CCAqyy1h82mfRL6CsvL1MJZ0iU3Ez/EIy6zHF4mcaue+R s1NlmsvUCefwsytdDwsVwA8FfDMu63FKgFLk3AecQMm9CkBcQT1YqPZpedNcIfeWpJd/it2v74vZ guj/RtVASwTafoE/aI2TGYN7Gx+2fpztDc01ZfMjOsWrIA1Pu6Dv07lRlmnIeuftwCqsf3ZiHQbw B24= =mg4s -----END PGP SIGNATURE----- --MBU0Z03ywHqTmMHjoTTP5JnuitAObvxI4-- --===============3659156267997683840== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3659156267997683840==--