mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: Sasha Finkelstein <fnkl.kernel@gmail.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	 Hector Martin <marcan@marcan.st>,
	Sven Peter <sven@svenpeter.dev>,
	 Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>,
	 Simona Vetter <simona@ffwll.ch>, Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Jessica Zhang <quic_jesszhan@quicinc.com>,
	asahi@lists.linux.dev,  linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Alyssa Ross <hi@alyssa.is>,
	Janne Grunau <j@jannau.net>
Subject: Re: [PATCH v4 2/5] drm: adp: Add Apple Display Pipe driver
Date: Fri, 17 Jan 2025 11:23:38 +0100	[thread overview]
Message-ID: <20250117-bright-passionate-ibis-804a8a@houat> (raw)
In-Reply-To: <CAMT+MTT+_ER+mFP1yUY+L-47-sZfNmtHUp09rqpPG174OKMJKA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]

Hi,

On Thu, Jan 16, 2025 at 07:52:30PM +0100, Sasha Finkelstein wrote:
> On Wed, 15 Jan 2025 at 11:21, Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> > > +     ret = drm_simple_encoder_init(drm, &adp->encoder, DRM_MODE_ENCODER_DSI);
> >
> > This is being deprecated, please use drm_encoder_init() /
> > drmm_encoder_init() instead.
> 
> I seem to be unable to find any documentation or a mailing list post
> to this effect. If you are referring to this patchset:
> https://patchwork.kernel.org/project/linux-samsung-soc/patch/20200313201744.19773-3-sam@ravnborg.org/
> according to my understanding, it has not been applied.
> In this case, the simple encoder api provides all functionality i need,
> and a replacement would just be a simple encoder, except copied and pasted
> into this driver.

a drmm_encoder_(alloc|init)'d encoder with a NULL funcs pointer is
strictly equivalent and doesn't require any extra infrastructure or work
on your side compared to what you have here.

> > > +static void adp_remove(struct platform_device *pdev)
> > > +{
> > > +     struct device *dev = &pdev->dev;
> > > +     struct drm_device *drm = dev_get_drvdata(dev);
> > > +     struct adp_drv_private *adp = to_adp(drm);
> > > +
> > > +     adp_disable_vblank(adp);
> >
> > Isn't it being helped by the DRM itself? Anyway, I'd suggest moving it
> > after DRM device unregistration and shutdown.
> 
> Not sure i follow, as this call disables generation of vblank interrupts,
> shouldn't it be done before all drm structures are torn down, to prevent
> the interrupt handler from potentially operating on objects that are in
> an invalid state?

Your adp_crtc_atomic_disable() function calls drm_crtc_vblank_off()
already. drm_atomic_helper_shutdown() will call the CRTC disable hook if
relevant, so you're effectively disabling vblank twice here.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

  reply	other threads:[~2025-01-17 10:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 21:38 [PATCH v4 0/5] Driver for pre-DCP apple display controller Sasha Finkelstein via B4 Relay
2025-01-14 21:38 ` [PATCH v4 1/5] dt-bindings: display: Add Apple pre-DCP " Sasha Finkelstein via B4 Relay
2025-01-15  9:20   ` Krzysztof Kozlowski
2025-01-14 21:38 ` [PATCH v4 2/5] drm: adp: Add Apple Display Pipe driver Sasha Finkelstein via B4 Relay
2025-01-15 10:21   ` Dmitry Baryshkov
2025-01-16 16:01     ` Maxime Ripard
2025-01-17  3:43       ` Dmitry Baryshkov
2025-01-17 10:23         ` Maxime Ripard
2025-01-17 14:17           ` Sasha Finkelstein
2025-01-17 14:37             ` Maxime Ripard
2025-01-18 21:35             ` Dmitry Baryshkov
2025-01-16 18:52     ` Sasha Finkelstein
2025-01-17 10:23       ` Maxime Ripard [this message]
2025-01-17 10:39   ` Thomas Zimmermann
2025-01-14 21:38 ` [PATCH v4 3/5] drm: panel: Add a panel driver for the Summit display Sasha Finkelstein via B4 Relay
2025-01-14 21:38 ` [PATCH v4 4/5] arm64: dts: apple: Add touchbar screen nodes Sasha Finkelstein via B4 Relay
2025-01-15 14:07   ` Nick Chan
2025-01-14 21:38 ` [PATCH v4 5/5] MAINTAINERS: Add entries for touchbar display driver Sasha Finkelstein via B4 Relay
2025-01-18 12:28   ` Sven Peter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250117-bright-passionate-ibis-804a8a@houat \
    --to=mripard@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fnkl.kernel@gmail.com \
    --cc=hi@alyssa.is \
    --cc=j@jannau.net \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marcan@marcan.st \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sven@svenpeter.dev \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®