linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: Add a few formats
@ 2016-10-18  8:46 Maxime Ripard
  2016-10-21  3:15 ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2016-10-18  8:46 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Daniel Vetter, David Airlie

The planes can do more than what was previously exposed. Add support for
them.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
 drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
 2 files changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index afb7ddf660ef..b184a476a480 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
 		*mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
 		break;
 
+	case DRM_FORMAT_ARGB4444:
+		*mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
+		break;
+
+	case DRM_FORMAT_ARGB1555:
+		*mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
+		break;
+
+	case DRM_FORMAT_RGBA5551:
+		*mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
+		break;
+
+	case DRM_FORMAT_RGBA4444:
+		*mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
+		break;
+
 	case DRM_FORMAT_XRGB8888:
 		*mode = SUN4I_BACKEND_LAY_FBFMT_XRGB8888;
 		break;
@@ -104,6 +120,10 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
 		*mode = SUN4I_BACKEND_LAY_FBFMT_RGB888;
 		break;
 
+	case DRM_FORMAT_RGB565:
+		*mode = SUN4I_BACKEND_LAY_FBFMT_RGB565;
+		break;
+
 	default:
 		return -EINVAL;
 	}
diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
index f0035bf5efea..5d53c977bca5 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -73,12 +73,18 @@ static const struct drm_plane_funcs sun4i_backend_layer_funcs = {
 static const uint32_t sun4i_backend_layer_formats_primary[] = {
 	DRM_FORMAT_ARGB8888,
 	DRM_FORMAT_RGB888,
+	DRM_FORMAT_RGB565,
 	DRM_FORMAT_XRGB8888,
 };
 
 static const uint32_t sun4i_backend_layer_formats_overlay[] = {
 	DRM_FORMAT_ARGB8888,
+	DRM_FORMAT_ARGB4444,
+	DRM_FORMAT_ARGB1555,
+	DRM_FORMAT_RGBA5551,
+	DRM_FORMAT_RGBA4444,
 	DRM_FORMAT_RGB888,
+	DRM_FORMAT_RGB565,
 	DRM_FORMAT_XRGB8888,
 };
 
-- 
2.9.3

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

* Re: [PATCH] drm/sun4i: Add a few formats
  2016-10-18  8:46 [PATCH] drm/sun4i: Add a few formats Maxime Ripard
@ 2016-10-21  3:15 ` Chen-Yu Tsai
  2016-10-24 14:40   ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2016-10-21  3:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, linux-arm-kernel, linux-kernel,
	Daniel Vetter, David Airlie

On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The planes can do more than what was previously exposed. Add support for
> them.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
>  2 files changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> index afb7ddf660ef..b184a476a480 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> @@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
>                 *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
>                 break;
>
> +       case DRM_FORMAT_ARGB4444:
> +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
> +               break;
> +
> +       case DRM_FORMAT_ARGB1555:
> +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
> +               break;
> +
> +       case DRM_FORMAT_RGBA5551:
> +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
> +               break;
> +
> +       case DRM_FORMAT_RGBA4444:
> +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;

The A20 manual only lists ARGB4444, not RGBA4444. There might be
some discrepancy here. We can deal with them

Also there are some more formats missing from the list, could you
add them as well?

> +               break;
> +
>         case DRM_FORMAT_XRGB8888:
>                 *mode = SUN4I_BACKEND_LAY_FBFMT_XRGB8888;
>                 break;
> @@ -104,6 +120,10 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
>                 *mode = SUN4I_BACKEND_LAY_FBFMT_RGB888;
>                 break;
>
> +       case DRM_FORMAT_RGB565:
> +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGB565;
> +               break;
> +
>         default:
>                 return -EINVAL;
>         }
> diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
> index f0035bf5efea..5d53c977bca5 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_layer.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
> @@ -73,12 +73,18 @@ static const struct drm_plane_funcs sun4i_backend_layer_funcs = {
>  static const uint32_t sun4i_backend_layer_formats_primary[] = {
>         DRM_FORMAT_ARGB8888,
>         DRM_FORMAT_RGB888,
> +       DRM_FORMAT_RGB565,
>         DRM_FORMAT_XRGB8888,
>  };
>
>  static const uint32_t sun4i_backend_layer_formats_overlay[] = {
>         DRM_FORMAT_ARGB8888,
> +       DRM_FORMAT_ARGB4444,
> +       DRM_FORMAT_ARGB1555,
> +       DRM_FORMAT_RGBA5551,
> +       DRM_FORMAT_RGBA4444,
>         DRM_FORMAT_RGB888,
> +       DRM_FORMAT_RGB565,
>         DRM_FORMAT_XRGB8888,

Could you explain in the commit log why these 2 aren't the same?

Thanks
ChenYu

>  };
>
> --
> 2.9.3
>

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

* Re: [PATCH] drm/sun4i: Add a few formats
  2016-10-21  3:15 ` Chen-Yu Tsai
@ 2016-10-24 14:40   ` Maxime Ripard
  2016-10-25  0:42     ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2016-10-24 14:40 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Daniel Vetter, David Airlie

[-- Attachment #1: Type: text/plain, Size: 3428 bytes --]

Hi,

On Fri, Oct 21, 2016 at 11:15:32AM +0800, Chen-Yu Tsai wrote:
> On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > The planes can do more than what was previously exposed. Add support for
> > them.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
> >  drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
> >  2 files changed, 26 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > index afb7ddf660ef..b184a476a480 100644
> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> > @@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
> >                 break;
> >
> > +       case DRM_FORMAT_ARGB4444:
> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
> > +               break;
> > +
> > +       case DRM_FORMAT_ARGB1555:
> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
> > +               break;
> > +
> > +       case DRM_FORMAT_RGBA5551:
> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
> > +               break;
> > +
> > +       case DRM_FORMAT_RGBA4444:
> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
> 
> The A20 manual only lists ARGB4444, not RGBA4444. There might be
> some discrepancy here. We can deal with them

Hmm, yes, that's weird. But I guess this would be part of porting it
to the A20.

> Also there are some more formats missing from the list, could you
> add them as well?

Which one do you refer to?

> > +               break;
> > +
> >         case DRM_FORMAT_XRGB8888:
> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_XRGB8888;
> >                 break;
> > @@ -104,6 +120,10 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_RGB888;
> >                 break;
> >
> > +       case DRM_FORMAT_RGB565:
> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGB565;
> > +               break;
> > +
> >         default:
> >                 return -EINVAL;
> >         }
> > diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
> > index f0035bf5efea..5d53c977bca5 100644
> > --- a/drivers/gpu/drm/sun4i/sun4i_layer.c
> > +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
> > @@ -73,12 +73,18 @@ static const struct drm_plane_funcs sun4i_backend_layer_funcs = {
> >  static const uint32_t sun4i_backend_layer_formats_primary[] = {
> >         DRM_FORMAT_ARGB8888,
> >         DRM_FORMAT_RGB888,
> > +       DRM_FORMAT_RGB565,
> >         DRM_FORMAT_XRGB8888,
> >  };
> >
> >  static const uint32_t sun4i_backend_layer_formats_overlay[] = {
> >         DRM_FORMAT_ARGB8888,
> > +       DRM_FORMAT_ARGB4444,
> > +       DRM_FORMAT_ARGB1555,
> > +       DRM_FORMAT_RGBA5551,
> > +       DRM_FORMAT_RGBA4444,
> >         DRM_FORMAT_RGB888,
> > +       DRM_FORMAT_RGB565,
> >         DRM_FORMAT_XRGB8888,
> 
> Could you explain in the commit log why these 2 aren't the same?

Yep, I will.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH] drm/sun4i: Add a few formats
  2016-10-24 14:40   ` Maxime Ripard
@ 2016-10-25  0:42     ` Chen-Yu Tsai
  2016-10-27 14:35       ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2016-10-25  0:42 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, linux-arm-kernel, linux-kernel,
	Daniel Vetter, David Airlie

On Mon, Oct 24, 2016 at 10:40 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Fri, Oct 21, 2016 at 11:15:32AM +0800, Chen-Yu Tsai wrote:
>> On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > The planes can do more than what was previously exposed. Add support for
>> > them.
>> >
>> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>> > ---
>> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
>> >  drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
>> >  2 files changed, 26 insertions(+)
>> >
>> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
>> > index afb7ddf660ef..b184a476a480 100644
>> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
>> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
>> > @@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
>> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
>> >                 break;
>> >
>> > +       case DRM_FORMAT_ARGB4444:
>> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
>> > +               break;
>> > +
>> > +       case DRM_FORMAT_ARGB1555:
>> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
>> > +               break;
>> > +
>> > +       case DRM_FORMAT_RGBA5551:
>> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
>> > +               break;
>> > +
>> > +       case DRM_FORMAT_RGBA4444:
>> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
>>
>> The A20 manual only lists ARGB4444, not RGBA4444. There might be
>> some discrepancy here. We can deal with them
>
> Hmm, yes, that's weird. But I guess this would be part of porting it
> to the A20.
>
>> Also there are some more formats missing from the list, could you
>> add them as well?
>
> Which one do you refer to?

RGB556 and RGB655.

>
>> > +               break;
>> > +
>> >         case DRM_FORMAT_XRGB8888:
>> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_XRGB8888;
>> >                 break;
>> > @@ -104,6 +120,10 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
>> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_RGB888;
>> >                 break;
>> >
>> > +       case DRM_FORMAT_RGB565:
>> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGB565;
>> > +               break;
>> > +
>> >         default:
>> >                 return -EINVAL;
>> >         }
>> > diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c
>> > index f0035bf5efea..5d53c977bca5 100644
>> > --- a/drivers/gpu/drm/sun4i/sun4i_layer.c
>> > +++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
>> > @@ -73,12 +73,18 @@ static const struct drm_plane_funcs sun4i_backend_layer_funcs = {
>> >  static const uint32_t sun4i_backend_layer_formats_primary[] = {
>> >         DRM_FORMAT_ARGB8888,
>> >         DRM_FORMAT_RGB888,
>> > +       DRM_FORMAT_RGB565,
>> >         DRM_FORMAT_XRGB8888,
>> >  };
>> >
>> >  static const uint32_t sun4i_backend_layer_formats_overlay[] = {
>> >         DRM_FORMAT_ARGB8888,
>> > +       DRM_FORMAT_ARGB4444,
>> > +       DRM_FORMAT_ARGB1555,
>> > +       DRM_FORMAT_RGBA5551,
>> > +       DRM_FORMAT_RGBA4444,
>> >         DRM_FORMAT_RGB888,
>> > +       DRM_FORMAT_RGB565,
>> >         DRM_FORMAT_XRGB8888,
>>
>> Could you explain in the commit log why these 2 aren't the same?
>
> Yep, I will.

Cool! Thanks.

ChenYu

>
> Thanks!
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [PATCH] drm/sun4i: Add a few formats
  2016-10-25  0:42     ` Chen-Yu Tsai
@ 2016-10-27 14:35       ` Maxime Ripard
  2016-10-29 10:25         ` Chen-Yu Tsai
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2016-10-27 14:35 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Daniel Vetter, David Airlie

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

Hi,

On Tue, Oct 25, 2016 at 08:42:26AM +0800, Chen-Yu Tsai wrote:
> On Mon, Oct 24, 2016 at 10:40 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi,
> >
> > On Fri, Oct 21, 2016 at 11:15:32AM +0800, Chen-Yu Tsai wrote:
> >> On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard
> >> <maxime.ripard@free-electrons.com> wrote:
> >> > The planes can do more than what was previously exposed. Add support for
> >> > them.
> >> >
> >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> > ---
> >> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
> >> >  drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
> >> >  2 files changed, 26 insertions(+)
> >> >
> >> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> >> > index afb7ddf660ef..b184a476a480 100644
> >> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> >> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> >> > @@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
> >> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
> >> >                 break;
> >> >
> >> > +       case DRM_FORMAT_ARGB4444:
> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
> >> > +               break;
> >> > +
> >> > +       case DRM_FORMAT_ARGB1555:
> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
> >> > +               break;
> >> > +
> >> > +       case DRM_FORMAT_RGBA5551:
> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
> >> > +               break;
> >> > +
> >> > +       case DRM_FORMAT_RGBA4444:
> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
> >>
> >> The A20 manual only lists ARGB4444, not RGBA4444. There might be
> >> some discrepancy here. We can deal with them
> >
> > Hmm, yes, that's weird. But I guess this would be part of porting it
> > to the A20.
> >
> >> Also there are some more formats missing from the list, could you
> >> add them as well?
> >
> > Which one do you refer to?
> 
> RGB556 and RGB655.

These formats are not supported by Linux yet though.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH] drm/sun4i: Add a few formats
  2016-10-27 14:35       ` Maxime Ripard
@ 2016-10-29 10:25         ` Chen-Yu Tsai
  2016-11-02 18:55           ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2016-10-29 10:25 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, linux-arm-kernel, linux-kernel,
	Daniel Vetter, David Airlie

On Thu, Oct 27, 2016 at 10:35 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Tue, Oct 25, 2016 at 08:42:26AM +0800, Chen-Yu Tsai wrote:
>> On Mon, Oct 24, 2016 at 10:40 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > Hi,
>> >
>> > On Fri, Oct 21, 2016 at 11:15:32AM +0800, Chen-Yu Tsai wrote:
>> >> On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard
>> >> <maxime.ripard@free-electrons.com> wrote:
>> >> > The planes can do more than what was previously exposed. Add support for
>> >> > them.
>> >> >
>> >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>> >> > ---
>> >> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
>> >> >  drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
>> >> >  2 files changed, 26 insertions(+)
>> >> >
>> >> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
>> >> > index afb7ddf660ef..b184a476a480 100644
>> >> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
>> >> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
>> >> > @@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
>> >> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
>> >> >                 break;
>> >> >
>> >> > +       case DRM_FORMAT_ARGB4444:
>> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
>> >> > +               break;
>> >> > +
>> >> > +       case DRM_FORMAT_ARGB1555:
>> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
>> >> > +               break;
>> >> > +
>> >> > +       case DRM_FORMAT_RGBA5551:
>> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
>> >> > +               break;
>> >> > +
>> >> > +       case DRM_FORMAT_RGBA4444:
>> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
>> >>
>> >> The A20 manual only lists ARGB4444, not RGBA4444. There might be
>> >> some discrepancy here. We can deal with them
>> >
>> > Hmm, yes, that's weird. But I guess this would be part of porting it
>> > to the A20.
>> >
>> >> Also there are some more formats missing from the list, could you
>> >> add them as well?
>> >
>> > Which one do you refer to?
>>
>> RGB556 and RGB655.
>
> These formats are not supported by Linux yet though.

I see. Sorry for the noise.

Acked-by: Chen-Yu Tsai <wens@csie.org>

>
> Thanks,
> Maxime
>
> --
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

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

* Re: [PATCH] drm/sun4i: Add a few formats
  2016-10-29 10:25         ` Chen-Yu Tsai
@ 2016-11-02 18:55           ` Maxime Ripard
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2016-11-02 18:55 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Daniel Vetter, David Airlie

[-- Attachment #1: Type: text/plain, Size: 2746 bytes --]

On Sat, Oct 29, 2016 at 06:25:46PM +0800, Chen-Yu Tsai wrote:
> On Thu, Oct 27, 2016 at 10:35 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi,
> >
> > On Tue, Oct 25, 2016 at 08:42:26AM +0800, Chen-Yu Tsai wrote:
> >> On Mon, Oct 24, 2016 at 10:40 PM, Maxime Ripard
> >> <maxime.ripard@free-electrons.com> wrote:
> >> > Hi,
> >> >
> >> > On Fri, Oct 21, 2016 at 11:15:32AM +0800, Chen-Yu Tsai wrote:
> >> >> On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard
> >> >> <maxime.ripard@free-electrons.com> wrote:
> >> >> > The planes can do more than what was previously exposed. Add support for
> >> >> > them.
> >> >> >
> >> >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> >> > ---
> >> >> >  drivers/gpu/drm/sun4i/sun4i_backend.c | 20 ++++++++++++++++++++
> >> >> >  drivers/gpu/drm/sun4i/sun4i_layer.c   |  6 ++++++
> >> >> >  2 files changed, 26 insertions(+)
> >> >> >
> >> >> > diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
> >> >> > index afb7ddf660ef..b184a476a480 100644
> >> >> > --- a/drivers/gpu/drm/sun4i/sun4i_backend.c
> >> >> > +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
> >> >> > @@ -96,6 +96,22 @@ static int sun4i_backend_drm_format_to_layer(struct drm_plane *plane,
> >> >> >                 *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB8888;
> >> >> >                 break;
> >> >> >
> >> >> > +       case DRM_FORMAT_ARGB4444:
> >> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB4444;
> >> >> > +               break;
> >> >> > +
> >> >> > +       case DRM_FORMAT_ARGB1555:
> >> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_ARGB1555;
> >> >> > +               break;
> >> >> > +
> >> >> > +       case DRM_FORMAT_RGBA5551:
> >> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA5551;
> >> >> > +               break;
> >> >> > +
> >> >> > +       case DRM_FORMAT_RGBA4444:
> >> >> > +               *mode = SUN4I_BACKEND_LAY_FBFMT_RGBA4444;
> >> >>
> >> >> The A20 manual only lists ARGB4444, not RGBA4444. There might be
> >> >> some discrepancy here. We can deal with them
> >> >
> >> > Hmm, yes, that's weird. But I guess this would be part of porting it
> >> > to the A20.
> >> >
> >> >> Also there are some more formats missing from the list, could you
> >> >> add them as well?
> >> >
> >> > Which one do you refer to?
> >>
> >> RGB556 and RGB655.
> >
> > These formats are not supported by Linux yet though.
> 
> I see. Sorry for the noise.
> 
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Applied with a more verbose commit log.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2016-11-02 18:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18  8:46 [PATCH] drm/sun4i: Add a few formats Maxime Ripard
2016-10-21  3:15 ` Chen-Yu Tsai
2016-10-24 14:40   ` Maxime Ripard
2016-10-25  0:42     ` Chen-Yu Tsai
2016-10-27 14:35       ` Maxime Ripard
2016-10-29 10:25         ` Chen-Yu Tsai
2016-11-02 18:55           ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).