dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm: exynos: Perform initialization/cleanup at probe/remove time
Date: Sat, 17 Dec 2016 23:49:31 +0200	[thread overview]
Message-ID: <2533924.hPuqDt4CjU@avalon> (raw)
In-Reply-To: <CAPj87rO57fMxfLvAzr_jWoBr3DB2nRoDWnbMjZEx4NzCnUGrPw@mail.gmail.com>

Hi Daniel,

On Friday 16 Dec 2016 18:02:20 Daniel Stone wrote:
> On 13 December 2016 at 19:34, Laurent Pinchart wrote:
> > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > 
> > The drm driver .load() operation is prone to race conditions as it
> > initializes the driver after registering the device nodes. Its usage is
> > deprecated, inline it in the probe function and call drm_dev_alloc() and
> > drm_dev_register() explicitly.
> > 
> > For consistency inline the .unload() handler in the remove function as
> > well.
> 
> Almost there: you need to add 'drm->platformdev =
> to_platform_device(dev)' next to the drm->dev_private assignment.

I don't think that's needed. The field was indeed initialized by 
drm_get_platform_dev() (called from drm_platform_init()), but only used in two 
locations in the driver where the struct device is available through different 
ways.

As struct drm_device contains a separate struct device *dev, I'll write a 
patch to remove the platformdev field.

> I thought about cleaning this up, but my XU3's eMMC is dead, so testing
> on Exynos for me has a 5+ minute RTT through LAVA ... so this is:
> 
> Reviewed-by: Daniel Stone <daniels@collabora.com>

Thanks.

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-12-17 21:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 19:34 [PATCH 0/2] exynosdrm: Remove .load/.unload midlayer Laurent Pinchart
2016-12-13 19:34 ` [PATCH 1/2] drm: exynos: Perform initialization/cleanup at probe/remove time Laurent Pinchart
2016-12-13 21:03   ` Sean Paul
2016-12-13 21:10   ` Daniel Vetter
2016-12-13 21:30     ` Laurent Pinchart
2016-12-13 21:32       ` Sean Paul
2016-12-13 21:49         ` Daniel Vetter
2016-12-13 21:54           ` Laurent Pinchart
2016-12-16 18:02   ` Daniel Stone
2016-12-17 21:49     ` Laurent Pinchart [this message]
2016-12-17  0:33   ` Inki Dae
2016-12-17 22:12     ` Laurent Pinchart
2016-12-19  6:32       ` Inki Dae
2016-12-17 22:29   ` [PATCH v2] " Laurent Pinchart
2016-12-19  9:29     ` Daniel Stone
2016-12-13 19:34 ` [PATCH 2/2] drm: Remove unused drm_platform midlayer Laurent Pinchart
2016-12-13 21:03   ` Daniel Vetter
2016-12-13 21:04     ` Sean Paul
2016-12-17 22:39 ` [PATCH] drm: Remove the struct drm_device platformdev field Laurent Pinchart
2016-12-18 13:16   ` Daniel Vetter
2016-12-18 20:24     ` Laurent Pinchart
2016-12-19  8:30   ` Jyri Sarha
2017-01-03 13:49   ` Vincent ABRIOU
2017-01-03 14:00   ` Russell King - ARM Linux
2017-01-03 15:29   ` Rob Clark
2017-01-04  1:22   ` Xinwei Kong

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=2533924.hPuqDt4CjU@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=sw0312.kim@samsung.com \
    /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