All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] drm/gma500: Don't store crtc_funcs in psb_ops
@ 2022-03-17  9:25 Patrik Jakobsson
  2022-03-17 19:49 ` Thomas Zimmermann
  0 siblings, 1 reply; 2+ messages in thread
From: Patrik Jakobsson @ 2022-03-17  9:25 UTC (permalink / raw)
  To: dri-devel; +Cc: daniel.vetter, sam, tzimmermann

The drm_crtc_funcs are all generic and no chip specific functions are
necessary. We can therefore directly put gma_crtc_funcs into the
drm_crtc.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
---
 drivers/gpu/drm/gma500/cdv_device.c        | 1 -
 drivers/gpu/drm/gma500/oaktrail_device.c   | 1 -
 drivers/gpu/drm/gma500/psb_device.c        | 1 -
 drivers/gpu/drm/gma500/psb_drv.h           | 1 -
 drivers/gpu/drm/gma500/psb_intel_display.c | 3 +--
 5 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
index 887c157d75f4..f854f58bcbb3 100644
--- a/drivers/gpu/drm/gma500/cdv_device.c
+++ b/drivers/gpu/drm/gma500/cdv_device.c
@@ -603,7 +603,6 @@ const struct psb_ops cdv_chip_ops = {
 	.errata = cdv_errata,
 
 	.crtc_helper = &cdv_intel_helper_funcs,
-	.crtc_funcs = &gma_crtc_funcs,
 	.clock_funcs = &cdv_clock_funcs,
 
 	.output_init = cdv_output_init,
diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c
index 40f1bc736125..5923a9c89312 100644
--- a/drivers/gpu/drm/gma500/oaktrail_device.c
+++ b/drivers/gpu/drm/gma500/oaktrail_device.c
@@ -545,7 +545,6 @@ const struct psb_ops oaktrail_chip_ops = {
 	.chip_setup = oaktrail_chip_setup,
 	.chip_teardown = oaktrail_teardown,
 	.crtc_helper = &oaktrail_helper_funcs,
-	.crtc_funcs = &gma_crtc_funcs,
 
 	.output_init = oaktrail_output_init,
 
diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c
index e93e4191c0ca..59f325165667 100644
--- a/drivers/gpu/drm/gma500/psb_device.c
+++ b/drivers/gpu/drm/gma500/psb_device.c
@@ -329,7 +329,6 @@ const struct psb_ops psb_chip_ops = {
 	.chip_teardown = psb_chip_teardown,
 
 	.crtc_helper = &psb_intel_helper_funcs,
-	.crtc_funcs = &gma_crtc_funcs,
 	.clock_funcs = &psb_clock_funcs,
 
 	.output_init = psb_output_init,
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index 88f44dbbc4eb..aed167af13c5 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -578,7 +578,6 @@ struct psb_ops {
 
 	/* Sub functions */
 	struct drm_crtc_helper_funcs const *crtc_helper;
-	struct drm_crtc_funcs const *crtc_funcs;
 	const struct gma_clock_funcs *clock_funcs;
 
 	/* Setup hooks */
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c
index 6df62fe7c1e0..a99859b5b13a 100644
--- a/drivers/gpu/drm/gma500/psb_intel_display.c
+++ b/drivers/gpu/drm/gma500/psb_intel_display.c
@@ -488,8 +488,7 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
 		return;
 	}
 
-	/* Set the CRTC operations from the chip specific data */
-	drm_crtc_init(dev, &gma_crtc->base, dev_priv->ops->crtc_funcs);
+	drm_crtc_init(dev, &gma_crtc->base, &gma_crtc_funcs);
 
 	/* Set the CRTC clock functions from chip specific data */
 	gma_crtc->clock_funcs = dev_priv->ops->clock_funcs;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/4] drm/gma500: Don't store crtc_funcs in psb_ops
  2022-03-17  9:25 [PATCH 3/4] drm/gma500: Don't store crtc_funcs in psb_ops Patrik Jakobsson
@ 2022-03-17 19:49 ` Thomas Zimmermann
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2022-03-17 19:49 UTC (permalink / raw)
  To: Patrik Jakobsson, dri-devel; +Cc: daniel.vetter, sam


[-- Attachment #1.1: Type: text/plain, Size: 3512 bytes --]



Am 17.03.22 um 10:25 schrieb Patrik Jakobsson:
> The drm_crtc_funcs are all generic and no chip specific functions are
> necessary. We can therefore directly put gma_crtc_funcs into the
> drm_crtc.
> 
> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/gpu/drm/gma500/cdv_device.c        | 1 -
>   drivers/gpu/drm/gma500/oaktrail_device.c   | 1 -
>   drivers/gpu/drm/gma500/psb_device.c        | 1 -
>   drivers/gpu/drm/gma500/psb_drv.h           | 1 -
>   drivers/gpu/drm/gma500/psb_intel_display.c | 3 +--
>   5 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
> index 887c157d75f4..f854f58bcbb3 100644
> --- a/drivers/gpu/drm/gma500/cdv_device.c
> +++ b/drivers/gpu/drm/gma500/cdv_device.c
> @@ -603,7 +603,6 @@ const struct psb_ops cdv_chip_ops = {
>   	.errata = cdv_errata,
>   
>   	.crtc_helper = &cdv_intel_helper_funcs,
> -	.crtc_funcs = &gma_crtc_funcs,
>   	.clock_funcs = &cdv_clock_funcs,
>   
>   	.output_init = cdv_output_init,
> diff --git a/drivers/gpu/drm/gma500/oaktrail_device.c b/drivers/gpu/drm/gma500/oaktrail_device.c
> index 40f1bc736125..5923a9c89312 100644
> --- a/drivers/gpu/drm/gma500/oaktrail_device.c
> +++ b/drivers/gpu/drm/gma500/oaktrail_device.c
> @@ -545,7 +545,6 @@ const struct psb_ops oaktrail_chip_ops = {
>   	.chip_setup = oaktrail_chip_setup,
>   	.chip_teardown = oaktrail_teardown,
>   	.crtc_helper = &oaktrail_helper_funcs,
> -	.crtc_funcs = &gma_crtc_funcs,
>   
>   	.output_init = oaktrail_output_init,
>   
> diff --git a/drivers/gpu/drm/gma500/psb_device.c b/drivers/gpu/drm/gma500/psb_device.c
> index e93e4191c0ca..59f325165667 100644
> --- a/drivers/gpu/drm/gma500/psb_device.c
> +++ b/drivers/gpu/drm/gma500/psb_device.c
> @@ -329,7 +329,6 @@ const struct psb_ops psb_chip_ops = {
>   	.chip_teardown = psb_chip_teardown,
>   
>   	.crtc_helper = &psb_intel_helper_funcs,
> -	.crtc_funcs = &gma_crtc_funcs,
>   	.clock_funcs = &psb_clock_funcs,
>   
>   	.output_init = psb_output_init,
> diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
> index 88f44dbbc4eb..aed167af13c5 100644
> --- a/drivers/gpu/drm/gma500/psb_drv.h
> +++ b/drivers/gpu/drm/gma500/psb_drv.h
> @@ -578,7 +578,6 @@ struct psb_ops {
>   
>   	/* Sub functions */
>   	struct drm_crtc_helper_funcs const *crtc_helper;
> -	struct drm_crtc_funcs const *crtc_funcs;
>   	const struct gma_clock_funcs *clock_funcs;
>   
>   	/* Setup hooks */
> diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c
> index 6df62fe7c1e0..a99859b5b13a 100644
> --- a/drivers/gpu/drm/gma500/psb_intel_display.c
> +++ b/drivers/gpu/drm/gma500/psb_intel_display.c
> @@ -488,8 +488,7 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
>   		return;
>   	}
>   
> -	/* Set the CRTC operations from the chip specific data */
> -	drm_crtc_init(dev, &gma_crtc->base, dev_priv->ops->crtc_funcs);
> +	drm_crtc_init(dev, &gma_crtc->base, &gma_crtc_funcs);
>   
>   	/* Set the CRTC clock functions from chip specific data */
>   	gma_crtc->clock_funcs = dev_priv->ops->clock_funcs;

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-17 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17  9:25 [PATCH 3/4] drm/gma500: Don't store crtc_funcs in psb_ops Patrik Jakobsson
2022-03-17 19:49 ` Thomas Zimmermann

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.