drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M}
Subsystems (4)
PATCH 1/2 drm: exynos: Use DRM_FORMAT_{NV12, YUV420} instead of DRM_FORMAT_{NV12M, YUV420M}
From: Ville Syrjälä <[email protected]>
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.
---
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(-)
drivers/gpu/drm/exynos/exynos_drm_fb.h +2 -2
@@ -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 ;
drivers/gpu/drm/exynos/exynos_mixer.c +1 -1
@@ -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 ;
Signature · 6 lines
1.7.3.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm: Drop the NV12M and YUV420M formats
From: Ville Syrjälä <[email protected]>
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.
--- include/drm/drm_fourcc.h | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
include/drm/drm_fourcc.h +1 -5
@@ -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 */
Signature · 6 lines
1.7.3.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/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, <[email protected]>님의 말:
Quoted 53 lines
From: Ville Syrjälä <[email protected]>
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 <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>---
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(-)drivers/gpu/drm/exynos/exynos_drm_fb.h +1
-1@@ -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;
- caseDRM_FORMAT_YUV420M:
+ caseDRM_FORMAT_YUV420:
return 3;
default:
return 1;drivers/gpu/drm/exynos/exynos_mixer.c +0
-0@@ -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;
- caseDRM_FORMAT_NV12M:
+ caseDRM_FORMAT_NV12:
crcb_mode = false;
buf_num = 2;
break;
--
1.7.3.4
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel