All of lore.kernel.org
 help / color / mirror / Atom feed
* drm/exynos: two small fixes (v2)
@ 2015-04-23 12:12 Tobias Jakobi
  2015-04-23 12:12 ` [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling Tobias Jakobi
  2015-04-23 12:12 ` [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane Tobias Jakobi
  0 siblings, 2 replies; 11+ messages in thread
From: Tobias Jakobi @ 2015-04-23 12:12 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: dri-devel, gustavo.padovan, jy0922.shim, inki.dae

Hello,

I've modified the two patches in [1] so that they now apply to Inki's exynos-drm-next branch. The pixelformat one was rewritten, so that it doesn't rely on Gustavo's blending patch (which seems to need 
more discussion). The field cleanup patch was extended as Joonyoung suggested.

Since the patches changes considerably during that, I've dropped the rb tags (I'm not sure how this is handled?)

With best wishes,
Tobias


[1] http://www.spinics.net/lists/linux-samsung-soc/msg43702.html

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

* [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-23 12:12 drm/exynos: two small fixes (v2) Tobias Jakobi
@ 2015-04-23 12:12 ` Tobias Jakobi
  2015-04-24  1:48   ` Joonyoung Shim
  2015-04-23 12:12 ` [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane Tobias Jakobi
  1 sibling, 1 reply; 11+ messages in thread
From: Tobias Jakobi @ 2015-04-23 12:12 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: dri-devel, gustavo.padovan, jy0922.shim, inki.dae, Tobias Jakobi

Move the defines for the pixelformats that the mixer supports out
of mixer_graph_buffer() to the top of the source.
Then select the mixer pixelformat (pf) in mixer_graph_buffer() based on
the plane's pf (and not bpp).
Also add handling of RGB565 and XRGB1555 to the switch statement and
exit early if the plane has an unsupported pf.

Partially based on 'drm/exynos: enable/disable blend based on pixel
format' by Gustavo Padovan <gustavo.padovan@collabora.co.uk>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 drivers/gpu/drm/exynos/exynos_mixer.c | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index fbec750..1bd23ee 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -44,6 +44,12 @@
 #define MIXER_WIN_NR		3
 #define MIXER_DEFAULT_WIN	0
 
+/* The pixelformats that are natively supported by the mixer. */
+#define MIXER_PIXELFORMAT_RGB565 4
+#define MIXER_PIXELFORMAT_ARGB1555 5
+#define MIXER_PIXELFORMAT_ARGB4444 6
+#define MIXER_PIXELFORMAT_ARGB8888 7
+
 struct mixer_resources {
 	int			irq;
 	void __iomem		*mixer_regs;
@@ -531,20 +537,26 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
 
 	plane = &ctx->planes[win];
 
-	#define RGB565 4
-	#define ARGB1555 5
-	#define ARGB4444 6
-	#define ARGB8888 7
+	switch (plane->pixel_format) {
+	case DRM_FORMAT_XRGB4444:
+		fmt = MIXER_PIXELFORMAT_ARGB4444;
+		break;
+
+	case DRM_FORMAT_XRGB1555:
+		fmt = MIXER_PIXELFORMAT_ARGB1555;
+		break;
 
-	switch (plane->bpp) {
-	case 16:
-		fmt = ARGB4444;
+	case DRM_FORMAT_RGB565:
+		fmt = MIXER_PIXELFORMAT_RGB565;
 		break;
-	case 32:
-		fmt = ARGB8888;
+
+	case DRM_FORMAT_XRGB8888:
+		fmt = MIXER_PIXELFORMAT_ARGB8888;
 		break;
+
 	default:
-		fmt = ARGB8888;
+		DRM_DEBUG_KMS("pixelformat unsupported by mixer\n");
+		return;
 	}
 
 	/* check if mixer supports requested scaling setup */
-- 
2.0.5

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

* [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane
  2015-04-23 12:12 drm/exynos: two small fixes (v2) Tobias Jakobi
  2015-04-23 12:12 ` [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling Tobias Jakobi
@ 2015-04-23 12:12 ` Tobias Jakobi
  2015-04-24  1:54   ` Joonyoung Shim
  1 sibling, 1 reply; 11+ messages in thread
From: Tobias Jakobi @ 2015-04-23 12:12 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: dri-devel, gustavo.padovan, jy0922.shim, inki.dae, Tobias Jakobi

Remove the unused fields of struct exynos_drm_plane.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index e12ecb5..c80331b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -73,11 +73,6 @@ enum exynos_drm_output_type {
  * @zpos: order of overlay layer(z position).
  * @index_color: if using color key feature then this value would be used
  *			as index color.
- * @default_win: a window to be enabled.
- * @color_key: color key on or off.
- * @local_path: in case of lcd type, local path mode on or off.
- * @transparency: transparency on or off.
- * @activated: activated or not.
  * @enabled: enabled or not.
  * @resume: to resume or not.
  *
@@ -110,11 +105,6 @@ struct exynos_drm_plane {
 	unsigned int zpos;
 	unsigned int index_color;
 
-	bool default_win:1;
-	bool color_key:1;
-	bool local_path:1;
-	bool transparency:1;
-	bool activated:1;
 	bool enabled:1;
 	bool resume:1;
 };
-- 
2.0.5

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

* Re: [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-23 12:12 ` [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling Tobias Jakobi
@ 2015-04-24  1:48   ` Joonyoung Shim
  2015-04-24  8:10     ` Tobias Jakobi
  0 siblings, 1 reply; 11+ messages in thread
From: Joonyoung Shim @ 2015-04-24  1:48 UTC (permalink / raw)
  To: Tobias Jakobi, linux-samsung-soc; +Cc: gustavo.padovan, dri-devel

Hi Tobias,

On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
> Move the defines for the pixelformats that the mixer supports out
> of mixer_graph_buffer() to the top of the source.
> Then select the mixer pixelformat (pf) in mixer_graph_buffer() based on
> the plane's pf (and not bpp).
> Also add handling of RGB565 and XRGB1555 to the switch statement and
> exit early if the plane has an unsupported pf.
> 
> Partially based on 'drm/exynos: enable/disable blend based on pixel
> format' by Gustavo Padovan <gustavo.padovan@collabora.co.uk>.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 32 ++++++++++++++++++++++----------
>  1 file changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index fbec750..1bd23ee 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -44,6 +44,12 @@
>  #define MIXER_WIN_NR		3
>  #define MIXER_DEFAULT_WIN	0
>  
> +/* The pixelformats that are natively supported by the mixer. */
> +#define MIXER_PIXELFORMAT_RGB565 4
> +#define MIXER_PIXELFORMAT_ARGB1555 5
> +#define MIXER_PIXELFORMAT_ARGB4444 6
> +#define MIXER_PIXELFORMAT_ARGB8888 7
> +

Seems be long, how about s/PIXELFORMAT/FORMAT or just MIXER_RGB565 ... ?
Please use tab between define name and value.

>  struct mixer_resources {
>  	int			irq;
>  	void __iomem		*mixer_regs;
> @@ -531,20 +537,26 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
>  
>  	plane = &ctx->planes[win];
>  
> -	#define RGB565 4
> -	#define ARGB1555 5
> -	#define ARGB4444 6
> -	#define ARGB8888 7
> +	switch (plane->pixel_format) {
> +	case DRM_FORMAT_XRGB4444:
> +		fmt = MIXER_PIXELFORMAT_ARGB4444;
> +		break;
> +
> +	case DRM_FORMAT_XRGB1555:
> +		fmt = MIXER_PIXELFORMAT_ARGB1555;
> +		break;
>  
> -	switch (plane->bpp) {
> -	case 16:
> -		fmt = ARGB4444;
> +	case DRM_FORMAT_RGB565:
> +		fmt = MIXER_PIXELFORMAT_RGB565;
>  		break;
> -	case 32:
> -		fmt = ARGB8888;
> +
> +	case DRM_FORMAT_XRGB8888:
> +		fmt = MIXER_PIXELFORMAT_ARGB8888;
>  		break;
> +
>  	default:
> -		fmt = ARGB8888;
> +		DRM_DEBUG_KMS("pixelformat unsupported by mixer\n");
> +		return;
>  	}
>  
>  	/* check if mixer supports requested scaling setup */
> 

Hmm missing formats having alpha?
DRM_FORMAT_ARGB4444
DRM_FORMAT_ARGB1555
DRM_FORMAT_ARGB8888

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

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

* Re: [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane
  2015-04-23 12:12 ` [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane Tobias Jakobi
@ 2015-04-24  1:54   ` Joonyoung Shim
  2015-04-24 18:13     ` Gustavo Padovan
  0 siblings, 1 reply; 11+ messages in thread
From: Joonyoung Shim @ 2015-04-24  1:54 UTC (permalink / raw)
  To: Tobias Jakobi, linux-samsung-soc; +Cc: gustavo.padovan, dri-devel

Hi Tobias,

On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
> Remove the unused fields of struct exynos_drm_plane.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.h | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> index e12ecb5..c80331b 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> @@ -73,11 +73,6 @@ enum exynos_drm_output_type {
>   * @zpos: order of overlay layer(z position).
>   * @index_color: if using color key feature then this value would be used
>   *			as index color.
> - * @default_win: a window to be enabled.
> - * @color_key: color key on or off.
> - * @local_path: in case of lcd type, local path mode on or off.
> - * @transparency: transparency on or off.
> - * @activated: activated or not.
>   * @enabled: enabled or not.
>   * @resume: to resume or not.
>   *
> @@ -110,11 +105,6 @@ struct exynos_drm_plane {
>  	unsigned int zpos;
>  	unsigned int index_color;

How about remove also index_color?

>  
> -	bool default_win:1;
> -	bool color_key:1;
> -	bool local_path:1;
> -	bool transparency:1;
> -	bool activated:1;
>  	bool enabled:1;
>  	bool resume:1;
>  };
> 

Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>

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

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

* Re: [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-24  1:48   ` Joonyoung Shim
@ 2015-04-24  8:10     ` Tobias Jakobi
  2015-04-24 18:14       ` Gustavo Padovan
  2015-04-27  6:33       ` Joonyoung Shim
  0 siblings, 2 replies; 11+ messages in thread
From: Tobias Jakobi @ 2015-04-24  8:10 UTC (permalink / raw)
  To: Joonyoung Shim; +Cc: linux-samsung-soc, gustavo.padovan, dri-devel

On 2015-04-24 03:48, Joonyoung Shim wrote:
> Hi Tobias,
> 
> On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
>> Move the defines for the pixelformats that the mixer supports out
>> of mixer_graph_buffer() to the top of the source.
>> Then select the mixer pixelformat (pf) in mixer_graph_buffer() based 
>> on
>> the plane's pf (and not bpp).
>> Also add handling of RGB565 and XRGB1555 to the switch statement and
>> exit early if the plane has an unsupported pf.
>> 
>> Partially based on 'drm/exynos: enable/disable blend based on pixel
>> format' by Gustavo Padovan <gustavo.padovan@collabora.co.uk>.
>> 
>> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>> ---
>>  drivers/gpu/drm/exynos/exynos_mixer.c | 32 
>> ++++++++++++++++++++++----------
>>  1 file changed, 22 insertions(+), 10 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c 
>> b/drivers/gpu/drm/exynos/exynos_mixer.c
>> index fbec750..1bd23ee 100644
>> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
>> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
>> @@ -44,6 +44,12 @@
>>  #define MIXER_WIN_NR		3
>>  #define MIXER_DEFAULT_WIN	0
>> 
>> +/* The pixelformats that are natively supported by the mixer. */
>> +#define MIXER_PIXELFORMAT_RGB565 4
>> +#define MIXER_PIXELFORMAT_ARGB1555 5
>> +#define MIXER_PIXELFORMAT_ARGB4444 6
>> +#define MIXER_PIXELFORMAT_ARGB8888 7
>> +
> 
> Seems be long, how about s/PIXELFORMAT/FORMAT or just MIXER_RGB565 ... 
> ?
> Please use tab between define name and value.
How about MXR_FORMAT_XYZ, to stay consistent with the regs-mixer header?


>>  struct mixer_resources {
>>  	int			irq;
>>  	void __iomem		*mixer_regs;
>> @@ -531,20 +537,26 @@ static void mixer_graph_buffer(struct 
>> mixer_context *ctx, int win)
>> 
>>  	plane = &ctx->planes[win];
>> 
>> -	#define RGB565 4
>> -	#define ARGB1555 5
>> -	#define ARGB4444 6
>> -	#define ARGB8888 7
>> +	switch (plane->pixel_format) {
>> +	case DRM_FORMAT_XRGB4444:
>> +		fmt = MIXER_PIXELFORMAT_ARGB4444;
>> +		break;
>> +
>> +	case DRM_FORMAT_XRGB1555:
>> +		fmt = MIXER_PIXELFORMAT_ARGB1555;
>> +		break;
>> 
>> -	switch (plane->bpp) {
>> -	case 16:
>> -		fmt = ARGB4444;
>> +	case DRM_FORMAT_RGB565:
>> +		fmt = MIXER_PIXELFORMAT_RGB565;
>>  		break;
>> -	case 32:
>> -		fmt = ARGB8888;
>> +
>> +	case DRM_FORMAT_XRGB8888:
>> +		fmt = MIXER_PIXELFORMAT_ARGB8888;
>>  		break;
>> +
>>  	default:
>> -		fmt = ARGB8888;
>> +		DRM_DEBUG_KMS("pixelformat unsupported by mixer\n");
>> +		return;
>>  	}
>> 
>>  	/* check if mixer supports requested scaling setup */
>> 
> 
> Hmm missing formats having alpha?
> DRM_FORMAT_ARGB4444
> DRM_FORMAT_ARGB1555
> DRM_FORMAT_ARGB8888
Should be obvious from my other mail. Blending/alpha is currently 
screwed up, so we shouldn't add these formats at this point. At least 
not before figuring out how to properly solve the issue.



> Thanks.

With best wishes,
Tobias

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

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

* Re: [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane
  2015-04-24  1:54   ` Joonyoung Shim
@ 2015-04-24 18:13     ` Gustavo Padovan
  0 siblings, 0 replies; 11+ messages in thread
From: Gustavo Padovan @ 2015-04-24 18:13 UTC (permalink / raw)
  To: Joonyoung Shim
  Cc: Tobias Jakobi, linux-samsung-soc, dri-devel, gustavo.padovan, inki.dae

Hi Tobias,

2015-04-24 Joonyoung Shim <jy0922.shim@samsung.com>:

> Hi Tobias,
> 
> On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
> > Remove the unused fields of struct exynos_drm_plane.
> > 
> > Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> > ---
> >  drivers/gpu/drm/exynos/exynos_drm_drv.h | 10 ----------
> >  1 file changed, 10 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> > index e12ecb5..c80331b 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
> > @@ -73,11 +73,6 @@ enum exynos_drm_output_type {
> >   * @zpos: order of overlay layer(z position).
> >   * @index_color: if using color key feature then this value would be used
> >   *			as index color.
> > - * @default_win: a window to be enabled.
> > - * @color_key: color key on or off.
> > - * @local_path: in case of lcd type, local path mode on or off.
> > - * @transparency: transparency on or off.
> > - * @activated: activated or not.
> >   * @enabled: enabled or not.
> >   * @resume: to resume or not.
> >   *
> > @@ -110,11 +105,6 @@ struct exynos_drm_plane {
> >  	unsigned int zpos;
> >  	unsigned int index_color;
> 
> How about remove also index_color?

That one can go too.

> 
> >  
> > -	bool default_win:1;
> > -	bool color_key:1;
> > -	bool local_path:1;
> > -	bool transparency:1;
> > -	bool activated:1;
> >  	bool enabled:1;
> >  	bool resume:1;
> >  };
> > 
> 
> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

	Gustavo

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

* Re: [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-24  8:10     ` Tobias Jakobi
@ 2015-04-24 18:14       ` Gustavo Padovan
  2015-04-25 18:08         ` Tobias Jakobi
  2015-04-27  6:33       ` Joonyoung Shim
  1 sibling, 1 reply; 11+ messages in thread
From: Gustavo Padovan @ 2015-04-24 18:14 UTC (permalink / raw)
  To: Tobias Jakobi; +Cc: linux-samsung-soc, gustavo.padovan, dri-devel

Hi Tobias,

2015-04-24 Tobias Jakobi <tjakobi@math.uni-bielefeld.de>:

> On 2015-04-24 03:48, Joonyoung Shim wrote:
> >Hi Tobias,
> >
> >On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
> >>Move the defines for the pixelformats that the mixer supports out
> >>of mixer_graph_buffer() to the top of the source.
> >>Then select the mixer pixelformat (pf) in mixer_graph_buffer() based on
> >>the plane's pf (and not bpp).
> >>Also add handling of RGB565 and XRGB1555 to the switch statement and
> >>exit early if the plane has an unsupported pf.
> >>
> >>Partially based on 'drm/exynos: enable/disable blend based on pixel
> >>format' by Gustavo Padovan <gustavo.padovan@collabora.co.uk>.
> >>
> >>Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> >>---
> >> drivers/gpu/drm/exynos/exynos_mixer.c | 32
> >>++++++++++++++++++++++----------
> >> 1 file changed, 22 insertions(+), 10 deletions(-)
> >>
> >>diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
> >>b/drivers/gpu/drm/exynos/exynos_mixer.c
> >>index fbec750..1bd23ee 100644
> >>--- a/drivers/gpu/drm/exynos/exynos_mixer.c
> >>+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> >>@@ -44,6 +44,12 @@
> >> #define MIXER_WIN_NR		3
> >> #define MIXER_DEFAULT_WIN	0
> >>
> >>+/* The pixelformats that are natively supported by the mixer. */
> >>+#define MIXER_PIXELFORMAT_RGB565 4
> >>+#define MIXER_PIXELFORMAT_ARGB1555 5
> >>+#define MIXER_PIXELFORMAT_ARGB4444 6
> >>+#define MIXER_PIXELFORMAT_ARGB8888 7
> >>+
> >
> >Seems be long, how about s/PIXELFORMAT/FORMAT or just MIXER_RGB565 ... ?
> >Please use tab between define name and value.
> How about MXR_FORMAT_XYZ, to stay consistent with the regs-mixer header?

I'm fine with MXR_FORMAT_XYZ. Other than that:

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

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

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

* Re: [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-24 18:14       ` Gustavo Padovan
@ 2015-04-25 18:08         ` Tobias Jakobi
  0 siblings, 0 replies; 11+ messages in thread
From: Tobias Jakobi @ 2015-04-25 18:08 UTC (permalink / raw)
  To: Gustavo Padovan, Tobias Jakobi, Joonyoung Shim,
	linux-samsung-soc, gustavo.padovan, dri-devel

Gustavo Padovan wrote:
>> How about MXR_FORMAT_XYZ, to stay consistent with the regs-mixer header?
> 
> I'm fine with MXR_FORMAT_XYZ. Other than that:
> 
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Thanks, updated version sent!

With best wishes,
Tobias


> 
> 	Gustavo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-24  8:10     ` Tobias Jakobi
  2015-04-24 18:14       ` Gustavo Padovan
@ 2015-04-27  6:33       ` Joonyoung Shim
  2015-04-27 12:06         ` Tobias Jakobi
  1 sibling, 1 reply; 11+ messages in thread
From: Joonyoung Shim @ 2015-04-27  6:33 UTC (permalink / raw)
  To: Tobias Jakobi; +Cc: linux-samsung-soc, gustavo.padovan, dri-devel

Hi Tobias,

On 04/24/2015 05:10 PM, Tobias Jakobi wrote:
> On 2015-04-24 03:48, Joonyoung Shim wrote:
>> Hi Tobias,
>>
>> On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
>>> Move the defines for the pixelformats that the mixer supports out
>>> of mixer_graph_buffer() to the top of the source.
>>> Then select the mixer pixelformat (pf) in mixer_graph_buffer() based on
>>> the plane's pf (and not bpp).
>>> Also add handling of RGB565 and XRGB1555 to the switch statement and
>>> exit early if the plane has an unsupported pf.
>>>
>>> Partially based on 'drm/exynos: enable/disable blend based on pixel
>>> format' by Gustavo Padovan <gustavo.padovan@collabora.co.uk>.
>>>
>>> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>>> ---
>>>  drivers/gpu/drm/exynos/exynos_mixer.c | 32 ++++++++++++++++++++++----------
>>>  1 file changed, 22 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
>>> index fbec750..1bd23ee 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
>>> @@ -44,6 +44,12 @@
>>>  #define MIXER_WIN_NR        3
>>>  #define MIXER_DEFAULT_WIN    0
>>>
>>> +/* The pixelformats that are natively supported by the mixer. */
>>> +#define MIXER_PIXELFORMAT_RGB565 4
>>> +#define MIXER_PIXELFORMAT_ARGB1555 5
>>> +#define MIXER_PIXELFORMAT_ARGB4444 6
>>> +#define MIXER_PIXELFORMAT_ARGB8888 7
>>> +
>>
>> Seems be long, how about s/PIXELFORMAT/FORMAT or just MIXER_RGB565 ... ?
>> Please use tab between define name and value.
> How about MXR_FORMAT_XYZ, to stay consistent with the regs-mixer header?
> 
> 
>>>  struct mixer_resources {
>>>      int            irq;
>>>      void __iomem        *mixer_regs;
>>> @@ -531,20 +537,26 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
>>>
>>>      plane = &ctx->planes[win];
>>>
>>> -    #define RGB565 4
>>> -    #define ARGB1555 5
>>> -    #define ARGB4444 6
>>> -    #define ARGB8888 7
>>> +    switch (plane->pixel_format) {
>>> +    case DRM_FORMAT_XRGB4444:
>>> +        fmt = MIXER_PIXELFORMAT_ARGB4444;
>>> +        break;
>>> +
>>> +    case DRM_FORMAT_XRGB1555:
>>> +        fmt = MIXER_PIXELFORMAT_ARGB1555;
>>> +        break;
>>>
>>> -    switch (plane->bpp) {
>>> -    case 16:
>>> -        fmt = ARGB4444;
>>> +    case DRM_FORMAT_RGB565:
>>> +        fmt = MIXER_PIXELFORMAT_RGB565;
>>>          break;
>>> -    case 32:
>>> -        fmt = ARGB8888;
>>> +
>>> +    case DRM_FORMAT_XRGB8888:
>>> +        fmt = MIXER_PIXELFORMAT_ARGB8888;
>>>          break;
>>> +
>>>      default:
>>> -        fmt = ARGB8888;
>>> +        DRM_DEBUG_KMS("pixelformat unsupported by mixer\n");
>>> +        return;
>>>      }
>>>
>>>      /* check if mixer supports requested scaling setup */
>>>
>>
>> Hmm missing formats having alpha?
>> DRM_FORMAT_ARGB4444
>> DRM_FORMAT_ARGB1555
>> DRM_FORMAT_ARGB8888
> Should be obvious from my other mail. Blending/alpha is currently screwed up, so we shouldn't add these formats at this point. At least not before figuring out how to properly solve the issue.
> 

It shouldn't mean to remove current supported feature(alpha pixel format
plane support of mixer driver).

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

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

* Re: [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling
  2015-04-27  6:33       ` Joonyoung Shim
@ 2015-04-27 12:06         ` Tobias Jakobi
  0 siblings, 0 replies; 11+ messages in thread
From: Tobias Jakobi @ 2015-04-27 12:06 UTC (permalink / raw)
  To: Joonyoung Shim; +Cc: linux-samsung-soc, dri-devel, gustavo.padovan, inki.dae

On 2015-04-27 08:33, Joonyoung Shim wrote:
> Hi Tobias,
> 
> On 04/24/2015 05:10 PM, Tobias Jakobi wrote:
>> On 2015-04-24 03:48, Joonyoung Shim wrote:
>>> Hi Tobias,
>>> 
>>> On 04/23/2015 09:12 PM, Tobias Jakobi wrote:
>>>> Move the defines for the pixelformats that the mixer supports out
>>>> of mixer_graph_buffer() to the top of the source.
>>>> Then select the mixer pixelformat (pf) in mixer_graph_buffer() based 
>>>> on
>>>> the plane's pf (and not bpp).
>>>> Also add handling of RGB565 and XRGB1555 to the switch statement and
>>>> exit early if the plane has an unsupported pf.
>>>> 
>>>> Partially based on 'drm/exynos: enable/disable blend based on pixel
>>>> format' by Gustavo Padovan <gustavo.padovan@collabora.co.uk>.
>>>> 
>>>> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>>>> ---
>>>>  drivers/gpu/drm/exynos/exynos_mixer.c | 32 
>>>> ++++++++++++++++++++++----------
>>>>  1 file changed, 22 insertions(+), 10 deletions(-)
>>>> 
>>>> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c 
>>>> b/drivers/gpu/drm/exynos/exynos_mixer.c
>>>> index fbec750..1bd23ee 100644
>>>> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
>>>> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
>>>> @@ -44,6 +44,12 @@
>>>>  #define MIXER_WIN_NR        3
>>>>  #define MIXER_DEFAULT_WIN    0
>>>> 
>>>> +/* The pixelformats that are natively supported by the mixer. */
>>>> +#define MIXER_PIXELFORMAT_RGB565 4
>>>> +#define MIXER_PIXELFORMAT_ARGB1555 5
>>>> +#define MIXER_PIXELFORMAT_ARGB4444 6
>>>> +#define MIXER_PIXELFORMAT_ARGB8888 7
>>>> +
>>> 
>>> Seems be long, how about s/PIXELFORMAT/FORMAT or just MIXER_RGB565 
>>> ... ?
>>> Please use tab between define name and value.
>> How about MXR_FORMAT_XYZ, to stay consistent with the regs-mixer 
>> header?
>> 
>> 
>>>>  struct mixer_resources {
>>>>      int            irq;
>>>>      void __iomem        *mixer_regs;
>>>> @@ -531,20 +537,26 @@ static void mixer_graph_buffer(struct 
>>>> mixer_context *ctx, int win)
>>>> 
>>>>      plane = &ctx->planes[win];
>>>> 
>>>> -    #define RGB565 4
>>>> -    #define ARGB1555 5
>>>> -    #define ARGB4444 6
>>>> -    #define ARGB8888 7
>>>> +    switch (plane->pixel_format) {
>>>> +    case DRM_FORMAT_XRGB4444:
>>>> +        fmt = MIXER_PIXELFORMAT_ARGB4444;
>>>> +        break;
>>>> +
>>>> +    case DRM_FORMAT_XRGB1555:
>>>> +        fmt = MIXER_PIXELFORMAT_ARGB1555;
>>>> +        break;
>>>> 
>>>> -    switch (plane->bpp) {
>>>> -    case 16:
>>>> -        fmt = ARGB4444;
>>>> +    case DRM_FORMAT_RGB565:
>>>> +        fmt = MIXER_PIXELFORMAT_RGB565;
>>>>          break;
>>>> -    case 32:
>>>> -        fmt = ARGB8888;
>>>> +
>>>> +    case DRM_FORMAT_XRGB8888:
>>>> +        fmt = MIXER_PIXELFORMAT_ARGB8888;
>>>>          break;
>>>> +
>>>>      default:
>>>> -        fmt = ARGB8888;
>>>> +        DRM_DEBUG_KMS("pixelformat unsupported by mixer\n");
>>>> +        return;
>>>>      }
>>>> 
>>>>      /* check if mixer supports requested scaling setup */
>>>> 
>>> 
>>> Hmm missing formats having alpha?
>>> DRM_FORMAT_ARGB4444
>>> DRM_FORMAT_ARGB1555
>>> DRM_FORMAT_ARGB8888
>> Should be obvious from my other mail. Blending/alpha is currently 
>> screwed up, so we shouldn't add these formats at this point. At least 
>> not before figuring out how to properly solve the issue.
>> 
> 
> It shouldn't mean to remove current supported feature(alpha pixel 
> format
> plane support of mixer driver).
Ah, I see what you mean! Going to send an updated version later this 
day.


With best wishes,
Tobias


> 
> Thanks.

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

end of thread, other threads:[~2015-04-27 12:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23 12:12 drm/exynos: two small fixes (v2) Tobias Jakobi
2015-04-23 12:12 ` [PATCH 1/2] drm/exynos: mixer: cleanup pixelformat handling Tobias Jakobi
2015-04-24  1:48   ` Joonyoung Shim
2015-04-24  8:10     ` Tobias Jakobi
2015-04-24 18:14       ` Gustavo Padovan
2015-04-25 18:08         ` Tobias Jakobi
2015-04-27  6:33       ` Joonyoung Shim
2015-04-27 12:06         ` Tobias Jakobi
2015-04-23 12:12 ` [PATCH 2/2] drm/exynos: cleanup exynos_drm_plane Tobias Jakobi
2015-04-24  1:54   ` Joonyoung Shim
2015-04-24 18:13     ` Gustavo Padovan

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.