All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 RESEND] drm: mxsfb: Implement .format_mod_supported
@ 2020-11-08 21:00 Daniel Abrecht
  2020-11-10 14:23 ` Daniel Vetter
  2020-11-26 12:35 ` Stefan Agner
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Abrecht @ 2020-11-08 21:00 UTC (permalink / raw)
  To: dri-devel; +Cc: Marek Vasut, kernel, linux-imx

This will make sure applications which use the IN_FORMATS blob
to figure out which modifiers they can use will pick up the
linear modifier which is needed by mxsfb. Such applications
will not work otherwise if an incompatible implicit modifier
ends up being selected.

Before commit ae1ed0093281 ("drm: mxsfb: Stop using DRM simple
display pipeline helper"), the DRM simple display pipeline
helper took care of this.

Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline 
helper")
---
  drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c 
b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 956f631997f2..fc4b1626261b 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -484,6 +484,13 @@ static void 
mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
  	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
  }

+static bool mxsfb_format_mod_supported(struct drm_plane *plane,
+				       uint32_t format,
+				       uint64_t modifier)
+{
+	return modifier == DRM_FORMAT_MOD_LINEAR;
+}
+
  static const struct drm_plane_helper_funcs 
mxsfb_plane_primary_helper_funcs = {
  	.atomic_check = mxsfb_plane_atomic_check,
  	.atomic_update = mxsfb_plane_primary_atomic_update,
@@ -495,6 +502,7 @@ static const struct drm_plane_helper_funcs 
mxsfb_plane_overlay_helper_funcs = {
  };

  static const struct drm_plane_funcs mxsfb_plane_funcs = {
+	.format_mod_supported	= mxsfb_format_mod_supported,
  	.update_plane		= drm_atomic_helper_update_plane,
  	.disable_plane		= drm_atomic_helper_disable_plane,
  	.destroy		= drm_plane_cleanup,
-- 
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 RESEND] drm: mxsfb: Implement .format_mod_supported
  2020-11-08 21:00 [PATCH v2 RESEND] drm: mxsfb: Implement .format_mod_supported Daniel Abrecht
@ 2020-11-10 14:23 ` Daniel Vetter
  2020-11-26 12:35 ` Stefan Agner
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2020-11-10 14:23 UTC (permalink / raw)
  To: Daniel Abrecht; +Cc: Marek Vasut, kernel, dri-devel, linux-imx

On Sun, Nov 08, 2020 at 09:00:01PM +0000, Daniel Abrecht wrote:
> This will make sure applications which use the IN_FORMATS blob
> to figure out which modifiers they can use will pick up the
> linear modifier which is needed by mxsfb. Such applications
> will not work otherwise if an incompatible implicit modifier
> ends up being selected.
> 
> Before commit ae1ed0093281 ("drm: mxsfb: Stop using DRM simple
> display pipeline helper"), the DRM simple display pipeline
> helper took care of this.
> 
> Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
> Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display pipeline
> helper")

Makes sense and I picked it up since it seems to be a bit lost. Applied
tod drm-misc-next, thanks for your patch.
-Daniel

> ---
>  drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> index 956f631997f2..fc4b1626261b 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> @@ -484,6 +484,13 @@ static void mxsfb_plane_overlay_atomic_update(struct
> drm_plane *plane,
>  	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
>  }
> 
> +static bool mxsfb_format_mod_supported(struct drm_plane *plane,
> +				       uint32_t format,
> +				       uint64_t modifier)
> +{
> +	return modifier == DRM_FORMAT_MOD_LINEAR;
> +}
> +
>  static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs
> = {
>  	.atomic_check = mxsfb_plane_atomic_check,
>  	.atomic_update = mxsfb_plane_primary_atomic_update,
> @@ -495,6 +502,7 @@ static const struct drm_plane_helper_funcs
> mxsfb_plane_overlay_helper_funcs = {
>  };
> 
>  static const struct drm_plane_funcs mxsfb_plane_funcs = {
> +	.format_mod_supported	= mxsfb_format_mod_supported,
>  	.update_plane		= drm_atomic_helper_update_plane,
>  	.disable_plane		= drm_atomic_helper_disable_plane,
>  	.destroy		= drm_plane_cleanup,
> -- 
> 2.20.1
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 RESEND] drm: mxsfb: Implement .format_mod_supported
  2020-11-08 21:00 [PATCH v2 RESEND] drm: mxsfb: Implement .format_mod_supported Daniel Abrecht
  2020-11-10 14:23 ` Daniel Vetter
@ 2020-11-26 12:35 ` Stefan Agner
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Agner @ 2020-11-26 12:35 UTC (permalink / raw)
  To: Daniel Abrecht; +Cc: Marek Vasut, kernel, dri-devel, linux-imx

On 2020-11-08 22:00, Daniel Abrecht wrote:
> This will make sure applications which use the IN_FORMATS blob
> to figure out which modifiers they can use will pick up the
> linear modifier which is needed by mxsfb. Such applications
> will not work otherwise if an incompatible implicit modifier
> ends up being selected.
> 
> Before commit ae1ed0093281 ("drm: mxsfb: Stop using DRM simple
> display pipeline helper"), the DRM simple display pipeline
> helper took care of this.
> 
> Signed-off-by: Daniel Abrecht <public@danielabrecht.ch>
> Fixes: ae1ed0093281 ("drm: mxsfb: Stop using DRM simple display
> pipeline helper")

Reviewed-by: Stefan Agner <stefan@agner.ch>

I allowed myself to update the author email to the one used in the
Signed-off-by line as checkpatch.pl printed a warning.

Applied to drm-misc-fixes. Thanks!

--
Stefan

> ---
>  drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> index 956f631997f2..fc4b1626261b 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
> @@ -484,6 +484,13 @@ static void
> mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,
>  	writel(ctrl, mxsfb->base + LCDC_AS_CTRL);
>  }
> 
> +static bool mxsfb_format_mod_supported(struct drm_plane *plane,
> +				       uint32_t format,
> +				       uint64_t modifier)
> +{
> +	return modifier == DRM_FORMAT_MOD_LINEAR;
> +}
> +
>  static const struct drm_plane_helper_funcs mxsfb_plane_primary_helper_funcs = {
>  	.atomic_check = mxsfb_plane_atomic_check,
>  	.atomic_update = mxsfb_plane_primary_atomic_update,
> @@ -495,6 +502,7 @@ static const struct drm_plane_helper_funcs
> mxsfb_plane_overlay_helper_funcs = {
>  };
> 
>  static const struct drm_plane_funcs mxsfb_plane_funcs = {
> +	.format_mod_supported	= mxsfb_format_mod_supported,
>  	.update_plane		= drm_atomic_helper_update_plane,
>  	.disable_plane		= drm_atomic_helper_disable_plane,
>  	.destroy		= drm_plane_cleanup,
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-11-26 12:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 21:00 [PATCH v2 RESEND] drm: mxsfb: Implement .format_mod_supported Daniel Abrecht
2020-11-10 14:23 ` Daniel Vetter
2020-11-26 12:35 ` Stefan Agner

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.