All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: David Airlie <airlied@linux.ie>, Rob Herring <robh+dt@kernel.org>,
	Brian Starkey <brian.starkey@arm.com>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	devicetree <devicetree@vger.kernel.org>,
	DRI devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Brown <David.Brown@arm.com>,
	LAKML <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 2/3] drm/arm: Add support for Mali Display Processors
Date: Wed, 15 Jun 2016 19:14:45 +0200	[thread overview]
Message-ID: <CAKMK7uGjfZAyzm6c6vsPZz79Tmx9mt4eewMyW6oCce9_-EezRg@mail.gmail.com> (raw)
In-Reply-To: <CAKMK7uENW3cU8LccHcqffX3cbzax2-5mzY0101yLfR7vtD4CoA@mail.gmail.com>

On Wed, Jun 15, 2016 at 7:13 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jun 15, 2016 at 6:17 PM, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
>> On Wed, Jun 15, 2016 at 05:23:10PM +0200, Daniel Vetter wrote:
>>> On Wed, Jun 15, 2016 at 03:51:34PM +0100, Liviu Dudau wrote:
>>> > Add support for the new family of Display Processors from ARM Ltd.
>>> > This commit adds basic support for Mali DP500, DP550 and DP650
>>> > parts, with only the display engine being supported at the moment.
>>> >
>>> > Cc: David Brown <David.Brown@arm.com>
>>> > Cc: Brian Starkey <Brian.Starkey@arm.com>
>>> >
>>> > Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
>>>
>>> Small thing I noticed: drm_dev_register/connector_register_all should be
>>> the last step in your init code, and unregister the first. Atm it's
>>> somewhere in the middle. But perfectly fine to do that as a follow-up.
>>
>> I've tried that, but the connector and encoder that gets registered as part
>> of the component_bind_all() fails if there is no drm dev registered. You did
>> comment on the v4 version about that and I did test your idea, sorry for
>> forgeting to update you on that.
>
> Why does it fail? That shouldn't happen ... we need to be able to set
> up everything first, before we register.

To clarify: As soon as drm_dev_register completes userspace can access
the drm_device instance. If you add/init anything like crtc, planes or
encoders later on it can blow up, since drm doesn't support hot-adding
those at all. Therefore you _must_ delay the registering until all
components are set up.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	DRI devel <dri-devel@lists.freedesktop.org>,
	Rob Herring <robh+dt@kernel.org>,
	LAKML <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 2/3] drm/arm: Add support for Mali Display Processors
Date: Wed, 15 Jun 2016 19:14:45 +0200	[thread overview]
Message-ID: <CAKMK7uGjfZAyzm6c6vsPZz79Tmx9mt4eewMyW6oCce9_-EezRg@mail.gmail.com> (raw)
In-Reply-To: <CAKMK7uENW3cU8LccHcqffX3cbzax2-5mzY0101yLfR7vtD4CoA@mail.gmail.com>

On Wed, Jun 15, 2016 at 7:13 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jun 15, 2016 at 6:17 PM, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
>> On Wed, Jun 15, 2016 at 05:23:10PM +0200, Daniel Vetter wrote:
>>> On Wed, Jun 15, 2016 at 03:51:34PM +0100, Liviu Dudau wrote:
>>> > Add support for the new family of Display Processors from ARM Ltd.
>>> > This commit adds basic support for Mali DP500, DP550 and DP650
>>> > parts, with only the display engine being supported at the moment.
>>> >
>>> > Cc: David Brown <David.Brown@arm.com>
>>> > Cc: Brian Starkey <Brian.Starkey@arm.com>
>>> >
>>> > Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
>>>
>>> Small thing I noticed: drm_dev_register/connector_register_all should be
>>> the last step in your init code, and unregister the first. Atm it's
>>> somewhere in the middle. But perfectly fine to do that as a follow-up.
>>
>> I've tried that, but the connector and encoder that gets registered as part
>> of the component_bind_all() fails if there is no drm dev registered. You did
>> comment on the v4 version about that and I did test your idea, sorry for
>> forgeting to update you on that.
>
> Why does it fail? That shouldn't happen ... we need to be able to set
> up everything first, before we register.

To clarify: As soon as drm_dev_register completes userspace can access
the drm_device instance. If you add/init anything like crtc, planes or
encoders later on it can blow up, since drm doesn't support hot-adding
those at all. Therefore you _must_ delay the registering until all
components are set up.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: daniel@ffwll.ch (Daniel Vetter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/3] drm/arm: Add support for Mali Display Processors
Date: Wed, 15 Jun 2016 19:14:45 +0200	[thread overview]
Message-ID: <CAKMK7uGjfZAyzm6c6vsPZz79Tmx9mt4eewMyW6oCce9_-EezRg@mail.gmail.com> (raw)
In-Reply-To: <CAKMK7uENW3cU8LccHcqffX3cbzax2-5mzY0101yLfR7vtD4CoA@mail.gmail.com>

On Wed, Jun 15, 2016 at 7:13 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jun 15, 2016 at 6:17 PM, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
>> On Wed, Jun 15, 2016 at 05:23:10PM +0200, Daniel Vetter wrote:
>>> On Wed, Jun 15, 2016 at 03:51:34PM +0100, Liviu Dudau wrote:
>>> > Add support for the new family of Display Processors from ARM Ltd.
>>> > This commit adds basic support for Mali DP500, DP550 and DP650
>>> > parts, with only the display engine being supported at the moment.
>>> >
>>> > Cc: David Brown <David.Brown@arm.com>
>>> > Cc: Brian Starkey <Brian.Starkey@arm.com>
>>> >
>>> > Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
>>>
>>> Small thing I noticed: drm_dev_register/connector_register_all should be
>>> the last step in your init code, and unregister the first. Atm it's
>>> somewhere in the middle. But perfectly fine to do that as a follow-up.
>>
>> I've tried that, but the connector and encoder that gets registered as part
>> of the component_bind_all() fails if there is no drm dev registered. You did
>> comment on the v4 version about that and I did test your idea, sorry for
>> forgeting to update you on that.
>
> Why does it fail? That shouldn't happen ... we need to be able to set
> up everything first, before we register.

To clarify: As soon as drm_dev_register completes userspace can access
the drm_device instance. If you add/init anything like crtc, planes or
encoders later on it can blow up, since drm doesn't support hot-adding
those at all. Therefore you _must_ delay the registering until all
components are set up.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2016-06-15 17:14 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 14:51 [PATCH v5 0/3] Add support for ARM Mali Display Processors Liviu Dudau
2016-06-15 14:51 ` Liviu Dudau
2016-06-15 14:51 ` Liviu Dudau
2016-06-15 14:51 ` [PATCH v5 1/3] dt/bindings: display: Add DT bindings for " Liviu Dudau
2016-06-15 14:51   ` Liviu Dudau
2016-06-15 14:51   ` Liviu Dudau
2016-06-15 14:51 ` [PATCH v5 2/3] drm/arm: Add support " Liviu Dudau
2016-06-15 14:51   ` Liviu Dudau
2016-06-15 14:51   ` Liviu Dudau
2016-06-15 15:23   ` Daniel Vetter
2016-06-15 15:23     ` Daniel Vetter
2016-06-15 15:23     ` Daniel Vetter
2016-06-15 16:17     ` Liviu Dudau
2016-06-15 16:17       ` Liviu Dudau
2016-06-15 16:17       ` Liviu Dudau
2016-06-15 17:13       ` Daniel Vetter
2016-06-15 17:13         ` Daniel Vetter
2016-06-15 17:13         ` Daniel Vetter
2016-06-15 17:14         ` Daniel Vetter [this message]
2016-06-15 17:14           ` Daniel Vetter
2016-06-15 17:14           ` Daniel Vetter
2016-06-15 17:21         ` Liviu Dudau
2016-06-15 17:21           ` Liviu Dudau
2016-06-15 17:21           ` Liviu Dudau
2016-06-15 17:35           ` Chris Wilson
2016-06-15 17:35             ` Chris Wilson
2016-06-15 17:35             ` Chris Wilson
2016-06-15 17:41             ` Liviu Dudau
2016-06-15 17:41               ` Liviu Dudau
2016-06-15 17:41               ` Liviu Dudau
2016-06-15 19:29           ` Daniel Vetter
2016-06-15 19:29             ` Daniel Vetter
2016-06-15 19:29             ` Daniel Vetter
2016-06-15 20:05             ` Russell King - ARM Linux
2016-06-15 20:05               ` Russell King - ARM Linux
2016-06-15 20:05               ` Russell King - ARM Linux
2016-06-15 20:30               ` Daniel Vetter
2016-06-15 20:30                 ` Daniel Vetter
2016-06-15 20:30                 ` Daniel Vetter
2016-06-15 20:11           ` Russell King - ARM Linux
2016-06-15 20:11             ` Russell King - ARM Linux
2016-06-15 20:11             ` Russell King - ARM Linux
2016-06-16  7:57             ` Liviu Dudau
2016-06-16  7:57               ` Liviu Dudau
2016-06-16  7:57               ` Liviu Dudau
2016-06-15 14:51 ` [PATCH v5 3/3] MAINTAINERS: Add entry for Mali-DP driver Liviu Dudau
2016-06-15 14:51   ` Liviu Dudau
2016-06-15 14:51   ` Liviu Dudau
2016-06-15 15:35   ` Eric Engestrom
2016-06-15 15:35     ` Eric Engestrom
2016-06-15 15:35     ` Eric Engestrom
2016-06-15 16:12     ` Daniel Vetter
2016-06-15 16:12       ` Daniel Vetter
2016-06-15 16:12       ` Daniel Vetter
2016-06-15 16:21       ` Liviu Dudau
2016-06-15 16:21         ` Liviu Dudau

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=CAKMK7uGjfZAyzm6c6vsPZz79Tmx9mt4eewMyW6oCce9_-EezRg@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=David.Brown@arm.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=airlied@linux.ie \
    --cc=brian.starkey@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.