All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M}
@ 2012-04-20 15:26 ville.syrjala
  2012-04-20 15:26 ` [PATCH 2/2] drm: Drop the NV12M and YUV420M formats ville.syrjala
  2012-04-21  4:07 ` [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M} InKi Dae
  0 siblings, 2 replies; 3+ messages in thread
From: ville.syrjala @ 2012-04-20 15:26 UTC (permalink / raw)
  To: dri-devel; +Cc: Inki Dae, Kyungmin Park, Seung-Woo Kim

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The NV12M/YUV420M formats are identical to the already existing standard
NV12/YUV420 formats. The M variants will be removed, so convert the
driver to use the standard names.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
Extra note: Based on a quick look, the driver appears to lack
sufficient sanity checks wrt. the framebuffer layout. I guess it
just assumes that handles[0] != handles[1] and offsets[] = { 0 }.

 drivers/gpu/drm/exynos/exynos_drm_fb.h |    4 ++--
 drivers/gpu/drm/exynos/exynos_mixer.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h
index 3ecb30d..5082375 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
@@ -31,10 +31,10 @@
 static inline int exynos_drm_format_num_buffers(uint32_t format)
 {
 	switch (format) {
-	case DRM_FORMAT_NV12M:
+	case DRM_FORMAT_NV12:
 	case DRM_FORMAT_NV12MT:
 		return 2;
-	case DRM_FORMAT_YUV420M:
+	case DRM_FORMAT_YUV420:
 		return 3;
 	default:
 		return 1;
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 4d5f41e..f1e2369 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -370,7 +370,7 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
 	switch (win_data->pixel_format) {
 	case DRM_FORMAT_NV12MT:
 		tiled_mode = true;
-	case DRM_FORMAT_NV12M:
+	case DRM_FORMAT_NV12:
 		crcb_mode = false;
 		buf_num = 2;
 		break;
-- 
1.7.3.4

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

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

* [PATCH 2/2] drm: Drop the NV12M and YUV420M formats
  2012-04-20 15:26 [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M} ville.syrjala
@ 2012-04-20 15:26 ` ville.syrjala
  2012-04-21  4:07 ` [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M} InKi Dae
  1 sibling, 0 replies; 3+ messages in thread
From: ville.syrjala @ 2012-04-20 15:26 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The NV12M/YUV420M formats are identical to the NV12/YUV420 formats.
So just remove these duplicated format names.

This might look like breaking the ABI, but the code has never actually
accepted these formats, so nothing can be using them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 include/drm/drm_fourcc.h |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index bdf0152..f462118 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -107,8 +107,7 @@
 #define DRM_FORMAT_NV16		fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
 #define DRM_FORMAT_NV61		fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
 
-/* 2 non contiguous plane YCbCr */
-#define DRM_FORMAT_NV12M	fourcc_code('N', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane */
+/* special NV12 tiled format */
 #define DRM_FORMAT_NV12MT	fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */
 
 /*
@@ -131,7 +130,4 @@
 #define DRM_FORMAT_YUV444	fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
 #define DRM_FORMAT_YVU444	fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
 
-/* 3 non contiguous plane YCbCr */
-#define DRM_FORMAT_YUV420M	fourcc_code('Y', 'M', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */
-
 #endif /* DRM_FOURCC_H */
-- 
1.7.3.4

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

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

* Re: [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M}
  2012-04-20 15:26 [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M} ville.syrjala
  2012-04-20 15:26 ` [PATCH 2/2] drm: Drop the NV12M and YUV420M formats ville.syrjala
@ 2012-04-21  4:07 ` InKi Dae
  1 sibling, 0 replies; 3+ messages in thread
From: InKi Dae @ 2012-04-21  4:07 UTC (permalink / raw)
  To: ville.syrjala; +Cc: Inki Dae, Kyungmin Park, Seung-Woo Kim, dri-devel

thanks for your patch but your patch set needs some codes for
identifying whether pixel format is multiplanar or not as you
mentioned. so I will add the codes and apply your patch set to
exynos-drm-fixes branch for drm-fixes.


2012년 4월 21일 오전 12:26,  <ville.syrjala@linux.intel.com>님의 말:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The NV12M/YUV420M formats are identical to the already existing standard
> NV12/YUV420 formats. The M variants will be removed, so convert the
> driver to use the standard names.
>
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Joonyoung Shim <jy0922.shim@samsung.com>
> Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> Extra note: Based on a quick look, the driver appears to lack
> sufficient sanity checks wrt. the framebuffer layout. I guess it
> just assumes that handles[0] != handles[1] and offsets[] = { 0 }.
>
>  drivers/gpu/drm/exynos/exynos_drm_fb.h |    4 ++--
>  drivers/gpu/drm/exynos/exynos_mixer.c  |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h
> index 3ecb30d..5082375 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
> @@ -31,10 +31,10 @@
>  static inline int exynos_drm_format_num_buffers(uint32_t format)
>  {
>        switch (format) {
> -       case DRM_FORMAT_NV12M:
> +       case DRM_FORMAT_NV12:
>        case DRM_FORMAT_NV12MT:
>                return 2;
> -       case DRM_FORMAT_YUV420M:
> +       case DRM_FORMAT_YUV420:
>                return 3;
>        default:
>                return 1;
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 4d5f41e..f1e2369 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -370,7 +370,7 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
>        switch (win_data->pixel_format) {
>        case DRM_FORMAT_NV12MT:
>                tiled_mode = true;
> -       case DRM_FORMAT_NV12M:
> +       case DRM_FORMAT_NV12:
>                crcb_mode = false;
>                buf_num = 2;
>                break;
> --
> 1.7.3.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2012-04-21  4:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20 15:26 [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M} ville.syrjala
2012-04-20 15:26 ` [PATCH 2/2] drm: Drop the NV12M and YUV420M formats ville.syrjala
2012-04-21  4:07 ` [PATCH 1/2] drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M} InKi Dae

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.