All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 6/9] drm/atmel-hlcdc: Use drm_fbdev_generic_setup()
Date: Thu, 25 Oct 2018 22:25:38 +0200	[thread overview]
Message-ID: <20181025222538.2bb77930@bbrezillon> (raw)
In-Reply-To: <20181025201340.34227-7-noralf@tronnes.org>

On Thu, 25 Oct 2018 22:13:37 +0200
Noralf Trønnes <noralf@tronnes.org> wrote:

> The CMA helper is already using the drm_fb_helper_generic_probe part of
> the generic fbdev emulation. This patch makes full use of the generic
> fbdev emulation by using its drm_client callbacks. This means that
> drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are
> now handled by the emulation code. Additionally fbdev unregister happens
> automatically on drm_dev_unregister().
> 
> The drm_fbdev_generic_setup() call is put after drm_dev_register() in the
> driver. This is done to highlight the fact that fbdev emulation is an
> internal client that makes use of the driver, it is not part of the
> driver as such. If fbdev setup fails, an error is printed, but the driver
> succeeds probing.
> 
> Cc: Boris Brezillon <boris.brezillon@bootlin.com>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>

Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>

> ---
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> index fedbfa333bb0..034a91112098 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> @@ -556,7 +556,6 @@ static int atmel_hlcdc_dc_atomic_commit(struct drm_device *dev,
>  
>  static const struct drm_mode_config_funcs mode_config_funcs = {
>  	.fb_create = atmel_hlcdc_fb_create,
> -	.output_poll_changed = drm_fb_helper_output_poll_changed,
>  	.atomic_check = drm_atomic_helper_check,
>  	.atomic_commit = atmel_hlcdc_dc_atomic_commit,
>  };
> @@ -658,8 +657,6 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev)
>  
>  	platform_set_drvdata(pdev, dev);
>  
> -	drm_fb_cma_fbdev_init(dev, 24, 0);
> -
>  	drm_kms_helper_poll_init(dev);
>  
>  	return 0;
> @@ -678,7 +675,6 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev)
>  {
>  	struct atmel_hlcdc_dc *dc = dev->dev_private;
>  
> -	drm_fb_cma_fbdev_fini(dev);
>  	flush_workqueue(dc->wq);
>  	drm_kms_helper_poll_fini(dev);
>  	drm_atomic_helper_shutdown(dev);
> @@ -727,7 +723,6 @@ static struct drm_driver atmel_hlcdc_dc_driver = {
>  	.driver_features = DRIVER_HAVE_IRQ | DRIVER_GEM |
>  			   DRIVER_MODESET | DRIVER_PRIME |
>  			   DRIVER_ATOMIC,
> -	.lastclose = drm_fb_helper_lastclose,
>  	.irq_handler = atmel_hlcdc_dc_irq_handler,
>  	.irq_preinstall = atmel_hlcdc_dc_irq_uninstall,
>  	.irq_postinstall = atmel_hlcdc_dc_irq_postinstall,
> @@ -769,6 +764,8 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_unload;
>  
> +	drm_fbdev_generic_setup(ddev, 24);
> +
>  	return 0;
>  
>  err_unload:

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

  reply	other threads:[~2018-10-25 20:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 20:13 [PATCH v2 0/9] drm/cma-helper drivers: Use drm_fbdev_generic_setup() Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 1/9] drm/arc: " Noralf Trønnes
2018-11-01 14:34   ` Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 2/9] drm/fsl-dcu: " Noralf Trønnes
2018-11-01 14:34   ` Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 3/9] drm/hisilicon/kirin: " Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 4/9] drm/mxsfb: " Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 5/9] drm/rcar-du: " Noralf Trønnes
2018-11-20 14:21   ` Noralf Trønnes
2018-11-28 17:03   ` Noralf Trønnes
2018-11-28 18:56     ` Laurent Pinchart
2018-10-25 20:13 ` [PATCH v2 6/9] drm/atmel-hlcdc: " Noralf Trønnes
2018-10-25 20:25   ` Boris Brezillon [this message]
2018-11-01 14:35     ` Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 7/9] drm/sun4i: " Noralf Trønnes
2018-10-26  8:27   ` Maxime Ripard
2018-11-01 14:35     ` Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 8/9] drm/tilcdc: " Noralf Trønnes
2018-10-29 15:55   ` Jyri Sarha
2018-11-01 14:35     ` Noralf Trønnes
2018-10-25 20:13 ` [PATCH v2 9/9] drm/cma-helper: Remove unused fbdev code Noralf Trønnes
2018-11-28 19:45   ` Laurent Pinchart

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=20181025222538.2bb77930@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=noralf@tronnes.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.