dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: chunkuang.hu@kernel.org, hdegoede@redhat.com, airlied@linux.ie,
	puck.chen@hisilicon.com, jsarha@ti.com,
	dri-devel@lists.freedesktop.org, paul@crapouillou.net,
	xinliang.liu@linaro.org, kong.kongxinwei@hisilicon.com,
	tomi.valkeinen@ti.com, kraxel@redhat.com, zourongrong@gmail.com,
	matthias.bgg@gmail.com, tiantao6@hisilicon.com, sean@poorly.run,
	emil.velikov@collabora.com
Subject: Re: [PATCH 00/10] Set up generic fbdev after registering device
Date: Wed, 8 Apr 2020 09:55:47 +0200	[thread overview]
Message-ID: <148cf6dd-4e53-2d3a-1819-a56d3a945d57@suse.de> (raw)
In-Reply-To: <87blo3lpwv.fsf@intel.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 3906 bytes --]

Hi Jani

Am 07.04.20 um 09:24 schrieb Jani Nikula:
> On Tue, 07 Apr 2020, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>> Hi Sam
>>
>> Am 06.04.20 um 22:00 schrieb Sam Ravnborg:
>>> Hi Thomas.
>>>
>>> On Mon, Apr 06, 2020 at 03:43:55PM +0200, Thomas Zimmermann wrote:
>>>> Generic fbdev emulation is a DRM client. If possible, it should behave
>>>> like userspace clients. Therefore it should not run before the driver
>>>> registered the new DRM device. If the setup function fails, the driver
>>>> should not report an error.
>>>
>>> Thanks for taking the time to refactor all the relevant drivers.
>>>
>>> I have received some push-back in the past when suggesting this,
>>> but cannot remember from who.
>>> Let's see what review comments you get.
>>>
>>> As the rule is that the fbdev setup shall be setup after registering
>>> the DRM device - it would be nice to have this included in the
>>> documentation of drm_fbdev_generic_setup
>>>
>>> Could you try to to update the documentation to cover this?
>>
>> Good idea. I'll add this to patchset's next iteration.
> 
> How about something like:
> 
> 	drm_WARN_ON(dev, !dev->registered);
> 
> (Not sure if that needs to be !dev->driver->load && !dev->registered).

I added such a warning to the patch. Only radeon uses load(), but it has
its own fbdev code. So the original test should be fine.

Best regards
Thomas

> 
> This can be a follow-up patch later too.
> 
> BR,
> Jani.
> 
> 
>>
>> Best regards
>> Thomas
>>
>>>
>>> I will get back to the patches later this week.
>>>
>>> 	Sam
>>>
>>>>
>>>> This is a follow-up patchset to the discussion at [1].  I went
>>>> through all calls to drm_fbdev_generic_setup(), moved them to the
>>>> final operation of their driver's probe function, and removed the
>>>> return value.
>>>>
>>>> Built-tested on x86-64, aarch64 and arm.
>>>>
>>>> [1] https://lore.kernel.org/dri-devel/20200403135828.2542770-1-daniel.vetter@ffwll.ch/T/#m216b5b37aeeb7b28d55ad73b7a702b3d1d7bf867
>>>>
>>>> Thomas Zimmermann (10):
>>>>   drm/ast: Set up fbdev after registering device; remove error checks
>>>>   drm/hibmc: Remove error check from fbdev setup
>>>>   drm/kirin: Set up fbdev after fully registering device
>>>>   drm/ingenic: Remove error check from fbdev setup
>>>>   drm/mediathek: Remove error check from fbdev setup
>>>>   drm/mgag200: Set up fbdev after registering device; remove error
>>>>     checks
>>>>   drm/tilcdc: Set up fbdev after fully registering device
>>>>   drm/udl: Remove error check from fbdev setup
>>>>   drm/vboxvideo: Set up fbdev after registering device; remove error
>>>>     checks
>>>>   drm/fb-helper: Remove return value from drm_fbdev_generic_setup()
>>>>
>>>>  drivers/gpu/drm/ast/ast_drv.c                  |  3 +++
>>>>  drivers/gpu/drm/ast/ast_main.c                 |  5 -----
>>>>  drivers/gpu/drm/drm_fb_helper.c                | 18 ++++++++----------
>>>>  .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c    |  6 +-----
>>>>  .../gpu/drm/hisilicon/kirin/kirin_drm_drv.c    |  4 ++--
>>>>  drivers/gpu/drm/ingenic/ingenic-drm.c          |  4 +---
>>>>  drivers/gpu/drm/mediatek/mtk_drm_drv.c         |  4 +---
>>>>  drivers/gpu/drm/mgag200/mgag200_drv.c          |  2 ++
>>>>  drivers/gpu/drm/mgag200/mgag200_main.c         |  4 ----
>>>>  drivers/gpu/drm/tilcdc/tilcdc_drv.c            |  3 +--
>>>>  drivers/gpu/drm/udl/udl_drv.c                  |  6 +-----
>>>>  drivers/gpu/drm/vboxvideo/vbox_drv.c           |  6 ++----
>>>>  include/drm/drm_fb_helper.h                    |  5 +++--
>>>>  13 files changed, 25 insertions(+), 45 deletions(-)
>>>>
>>>> --
>>>> 2.26.0
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

  reply	other threads:[~2020-04-08  7:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 13:43 [PATCH 00/10] Set up generic fbdev after registering device Thomas Zimmermann
2020-04-06 13:43 ` [PATCH 01/10] drm/ast: Set up fbdev after registering device; remove error checks Thomas Zimmermann
2020-04-06 13:43 ` [PATCH 02/10] drm/hibmc: Remove error check from fbdev setup Thomas Zimmermann
2020-04-06 13:43 ` [PATCH 03/10] drm/kirin: Set up fbdev after fully registering device Thomas Zimmermann
2020-04-07  8:04   ` Daniel Vetter
2020-04-07 13:19     ` Thomas Zimmermann
2020-04-06 13:43 ` [PATCH 04/10] drm/ingenic: Remove error check from fbdev setup Thomas Zimmermann
2020-04-06 23:45   ` Paul Cercueil
2020-04-06 13:44 ` [PATCH 05/10] drm/mediathek: " Thomas Zimmermann
2020-04-07 11:04   ` Noralf Trønnes
2020-04-06 13:44 ` [PATCH 06/10] drm/mgag200: Set up fbdev after registering device; remove error checks Thomas Zimmermann
2020-04-06 13:44 ` [PATCH 07/10] drm/tilcdc: Set up fbdev after fully registering device Thomas Zimmermann
2020-04-07 11:59   ` Jyri Sarha
2020-04-06 13:44 ` [PATCH 08/10] drm/udl: Remove error check from fbdev setup Thomas Zimmermann
2020-04-06 13:44 ` [PATCH 09/10] drm/vboxvideo: Set up fbdev after registering device; remove error checks Thomas Zimmermann
2020-04-06 13:44 ` [PATCH 10/10] drm/fb-helper: Remove return value from drm_fbdev_generic_setup() Thomas Zimmermann
2020-04-07 10:16   ` Sam Ravnborg
2020-04-06 20:00 ` [PATCH 00/10] Set up generic fbdev after registering device Sam Ravnborg
2020-04-07  6:28   ` Thomas Zimmermann
2020-04-07  7:24     ` Jani Nikula
2020-04-08  7:55       ` Thomas Zimmermann [this message]
2020-04-07 10:13     ` Sam Ravnborg
2020-04-07  7:21 ` Gerd Hoffmann
2020-04-07 11:02 ` Noralf Trønnes
2020-04-07 13:00   ` Thomas Zimmermann
2020-04-07 16:50     ` Sam Ravnborg
2020-04-08  6:28       ` Thomas Zimmermann

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=148cf6dd-4e53-2d3a-1819-a56d3a945d57@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=chunkuang.hu@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=hdegoede@redhat.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=jsarha@ti.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=matthias.bgg@gmail.com \
    --cc=paul@crapouillou.net \
    --cc=puck.chen@hisilicon.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=tiantao6@hisilicon.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=xinliang.liu@linaro.org \
    --cc=zourongrong@gmail.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