diff mbox series

drm/mxsfb: Make supported modifiers explicit

Message ID 26877532e272c12a74c33188e2a72abafc9a2e1c.1584973664.git.agx@sigxcpu.org (mailing list archive)
State New, archived
Headers show
Series drm/mxsfb: Make supported modifiers explicit | expand

Commit Message

Guido Günther March 23, 2020, 2:52 p.m. UTC
In contrast to other display controllers on imx like DCSS and ipuv3
lcdif/mxsfb does not support detiling e.g. vivante tiled layouts.
Since mesa might assume otherwise make it explicit that only
DRM_FORMAT_MOD_LINEAR is supported.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
 drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Lucas Stach March 23, 2020, 3:51 p.m. UTC | #1
Am Montag, den 23.03.2020, 15:52 +0100 schrieb Guido Günther:
> In contrast to other display controllers on imx like DCSS and ipuv3
> lcdif/mxsfb does not support detiling e.g. vivante tiled layouts.
> Since mesa might assume otherwise make it explicit that only
> DRM_FORMAT_MOD_LINEAR is supported.
> 
> Signed-off-by: Guido Günther <agx@sigxcpu.org>

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 762379530928..fc71e7a7a02e 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -73,6 +73,11 @@ static const uint32_t mxsfb_formats[] = {
>  	DRM_FORMAT_RGB565
>  };
>  
> +static const uint64_t mxsfb_modifiers[] = {
> +	DRM_FORMAT_MOD_LINEAR,
> +	DRM_FORMAT_MOD_INVALID
> +};
> +
>  static struct mxsfb_drm_private *
>  drm_pipe_to_mxsfb_drm_private(struct drm_simple_display_pipe *pipe)
>  {
> @@ -334,8 +339,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
>  	}
>  
>  	ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
> -			mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL,
> -			mxsfb->connector);
> +			mxsfb_formats, ARRAY_SIZE(mxsfb_formats),
> +			mxsfb_modifiers, mxsfb->connector);
>  	if (ret < 0) {
>  		dev_err(drm->dev, "Cannot setup simple display pipe\n");
>  		goto err_vblank;
Guido Günther July 18, 2020, 5:14 p.m. UTC | #2
Hi,
On Mon, Mar 23, 2020 at 04:51:05PM +0100, Lucas Stach wrote:
> Am Montag, den 23.03.2020, 15:52 +0100 schrieb Guido Günther:
> > In contrast to other display controllers on imx like DCSS and ipuv3
> > lcdif/mxsfb does not support detiling e.g. vivante tiled layouts.
> > Since mesa might assume otherwise make it explicit that only
> > DRM_FORMAT_MOD_LINEAR is supported.
> > 
> > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> 
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

Can i do anything to get this applied?
Cheers,
 -- Guido

> 
> > ---
> >  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> > index 762379530928..fc71e7a7a02e 100644
> > --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> > +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> > @@ -73,6 +73,11 @@ static const uint32_t mxsfb_formats[] = {
> >  	DRM_FORMAT_RGB565
> >  };
> >  
> > +static const uint64_t mxsfb_modifiers[] = {
> > +	DRM_FORMAT_MOD_LINEAR,
> > +	DRM_FORMAT_MOD_INVALID
> > +};
> > +
> >  static struct mxsfb_drm_private *
> >  drm_pipe_to_mxsfb_drm_private(struct drm_simple_display_pipe *pipe)
> >  {
> > @@ -334,8 +339,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
> >  	}
> >  
> >  	ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
> > -			mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL,
> > -			mxsfb->connector);
> > +			mxsfb_formats, ARRAY_SIZE(mxsfb_formats),
> > +			mxsfb_modifiers, mxsfb->connector);
> >  	if (ret < 0) {
> >  		dev_err(drm->dev, "Cannot setup simple display pipe\n");
> >  		goto err_vblank;
>
Daniel Vetter July 20, 2020, 7:31 a.m. UTC | #3
On Sat, Jul 18, 2020 at 07:14:07PM +0200, Guido Günther wrote:
> Hi,
> On Mon, Mar 23, 2020 at 04:51:05PM +0100, Lucas Stach wrote:
> > Am Montag, den 23.03.2020, 15:52 +0100 schrieb Guido Günther:
> > > In contrast to other display controllers on imx like DCSS and ipuv3
> > > lcdif/mxsfb does not support detiling e.g. vivante tiled layouts.
> > > Since mesa might assume otherwise make it explicit that only
> > > DRM_FORMAT_MOD_LINEAR is supported.
> > > 
> > > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> > 
> > Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> 
> Can i do anything to get this applied?
> Cheers,

Lucas has drm-misc commit rights, I expect him to push.
-Daniel

>  -- Guido
> 
> > 
> > > ---
> > >  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 +++++++--
> > >  1 file changed, 7 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> > > index 762379530928..fc71e7a7a02e 100644
> > > --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> > > +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> > > @@ -73,6 +73,11 @@ static const uint32_t mxsfb_formats[] = {
> > >  	DRM_FORMAT_RGB565
> > >  };
> > >  
> > > +static const uint64_t mxsfb_modifiers[] = {
> > > +	DRM_FORMAT_MOD_LINEAR,
> > > +	DRM_FORMAT_MOD_INVALID
> > > +};
> > > +
> > >  static struct mxsfb_drm_private *
> > >  drm_pipe_to_mxsfb_drm_private(struct drm_simple_display_pipe *pipe)
> > >  {
> > > @@ -334,8 +339,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
> > >  	}
> > >  
> > >  	ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
> > > -			mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL,
> > > -			mxsfb->connector);
> > > +			mxsfb_formats, ARRAY_SIZE(mxsfb_formats),
> > > +			mxsfb_modifiers, mxsfb->connector);
> > >  	if (ret < 0) {
> > >  		dev_err(drm->dev, "Cannot setup simple display pipe\n");
> > >  		goto err_vblank;
> >
Stefan Agner July 20, 2020, 9:03 a.m. UTC | #4
On 2020-07-18 19:14, Guido Günther wrote:
> Hi,
> On Mon, Mar 23, 2020 at 04:51:05PM +0100, Lucas Stach wrote:
>> Am Montag, den 23.03.2020, 15:52 +0100 schrieb Guido Günther:
>> > In contrast to other display controllers on imx like DCSS and ipuv3
>> > lcdif/mxsfb does not support detiling e.g. vivante tiled layouts.
>> > Since mesa might assume otherwise make it explicit that only
>> > DRM_FORMAT_MOD_LINEAR is supported.
>> >
>> > Signed-off-by: Guido Günther <agx@sigxcpu.org>
>>
>> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> 
> Can i do anything to get this applied?
> Cheers,
>  -- Guido

Sorry about the delay, I was thinking to apply it with another patchset
which is not ready though.

Pushed this patch to drm-misc-next just now.

--
Stefan

> 
>>
>> > ---
>> >  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 +++++++--
>> >  1 file changed, 7 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
>> > index 762379530928..fc71e7a7a02e 100644
>> > --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
>> > +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
>> > @@ -73,6 +73,11 @@ static const uint32_t mxsfb_formats[] = {
>> >  	DRM_FORMAT_RGB565
>> >  };
>> >
>> > +static const uint64_t mxsfb_modifiers[] = {
>> > +	DRM_FORMAT_MOD_LINEAR,
>> > +	DRM_FORMAT_MOD_INVALID
>> > +};
>> > +
>> >  static struct mxsfb_drm_private *
>> >  drm_pipe_to_mxsfb_drm_private(struct drm_simple_display_pipe *pipe)
>> >  {
>> > @@ -334,8 +339,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
>> >  	}
>> >
>> >  	ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
>> > -			mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL,
>> > -			mxsfb->connector);
>> > +			mxsfb_formats, ARRAY_SIZE(mxsfb_formats),
>> > +			mxsfb_modifiers, mxsfb->connector);
>> >  	if (ret < 0) {
>> >  		dev_err(drm->dev, "Cannot setup simple display pipe\n");
>> >  		goto err_vblank;
>>
Guido Günther July 20, 2020, 10:03 a.m. UTC | #5
Hi,
On Mon, Jul 20, 2020 at 11:03:04AM +0200, Stefan Agner wrote:
> On 2020-07-18 19:14, Guido Günther wrote:
> > Hi,
> > On Mon, Mar 23, 2020 at 04:51:05PM +0100, Lucas Stach wrote:
> >> Am Montag, den 23.03.2020, 15:52 +0100 schrieb Guido Günther:
> >> > In contrast to other display controllers on imx like DCSS and ipuv3
> >> > lcdif/mxsfb does not support detiling e.g. vivante tiled layouts.
> >> > Since mesa might assume otherwise make it explicit that only
> >> > DRM_FORMAT_MOD_LINEAR is supported.
> >> >
> >> > Signed-off-by: Guido Günther <agx@sigxcpu.org>
> >>
> >> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> > 
> > Can i do anything to get this applied?
> > Cheers,
> >  -- Guido
> 
> Sorry about the delay, I was thinking to apply it with another patchset
> which is not ready though.
> 
> Pushed this patch to drm-misc-next just now.

Thanks!
 -- Guido

> 
> --
> Stefan
> 
> > 
> >>
> >> > ---
> >> >  drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 +++++++--
> >> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> >> > index 762379530928..fc71e7a7a02e 100644
> >> > --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> >> > +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> >> > @@ -73,6 +73,11 @@ static const uint32_t mxsfb_formats[] = {
> >> >  	DRM_FORMAT_RGB565
> >> >  };
> >> >
> >> > +static const uint64_t mxsfb_modifiers[] = {
> >> > +	DRM_FORMAT_MOD_LINEAR,
> >> > +	DRM_FORMAT_MOD_INVALID
> >> > +};
> >> > +
> >> >  static struct mxsfb_drm_private *
> >> >  drm_pipe_to_mxsfb_drm_private(struct drm_simple_display_pipe *pipe)
> >> >  {
> >> > @@ -334,8 +339,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
> >> >  	}
> >> >
> >> >  	ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
> >> > -			mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL,
> >> > -			mxsfb->connector);
> >> > +			mxsfb_formats, ARRAY_SIZE(mxsfb_formats),
> >> > +			mxsfb_modifiers, mxsfb->connector);
> >> >  	if (ret < 0) {
> >> >  		dev_err(drm->dev, "Cannot setup simple display pipe\n");
> >> >  		goto err_vblank;
> >>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 762379530928..fc71e7a7a02e 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -73,6 +73,11 @@  static const uint32_t mxsfb_formats[] = {
 	DRM_FORMAT_RGB565
 };
 
+static const uint64_t mxsfb_modifiers[] = {
+	DRM_FORMAT_MOD_LINEAR,
+	DRM_FORMAT_MOD_INVALID
+};
+
 static struct mxsfb_drm_private *
 drm_pipe_to_mxsfb_drm_private(struct drm_simple_display_pipe *pipe)
 {
@@ -334,8 +339,8 @@  static int mxsfb_load(struct drm_device *drm, unsigned long flags)
 	}
 
 	ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
-			mxsfb_formats, ARRAY_SIZE(mxsfb_formats), NULL,
-			mxsfb->connector);
+			mxsfb_formats, ARRAY_SIZE(mxsfb_formats),
+			mxsfb_modifiers, mxsfb->connector);
 	if (ret < 0) {
 		dev_err(drm->dev, "Cannot setup simple display pipe\n");
 		goto err_vblank;