drm/i915/skl+: Add YUV pixel format in Capability list
Subsystems (2)
PATCH 1/1 drm/i915/skl+: Add YUV pixel format in Capability list
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in skl_primary_formats list.
Don't rely on fb->bits_per_pixel as intel_framebuffer_init is not filling bits_per_pixel field of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.
--- drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -3156,8 +3156,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,/* For planar: Bpp is for uv plane, y_Bpp is for y plane */ if (fb) { p->plane[0 ].enabled = true; - p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; + p->plane[0 ].bytes_per_pixel = +drm_format_plane_cpp (fb->pixel_format,1 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Mahesh
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in
skl_primary_formatslist.
Don't rely onfb->bits_per_pixelasintel_framebuffer_initis not fillingbits_per_pixelfield of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.Signed-off-by Kumar, Mahesh <[email protected]>Cc Konduru, Chandra <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static const uint32_t skl_primary_formats[] = { · line 78
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c +4
-0@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY,
Needs testcase (or reworking an existing testcase to also test the primary plane). Also we should really aim to unify all the skl plane functions ... -Daniel
Quoted 25 lines
drivers/gpu/drm/i915/intel_display.c +0
-0};/* Cursor formats */ drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -3156,8 +3156,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,/* For planar: Bpp is for uv plane, y_Bpp is for y plane */ if (fb) { p->plane[0 ].enabled = true; - p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; + p->plane[0 ].bytes_per_pixel = +drm_format_plane_cpp (fb->pixel_format,1 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915/skl+: Add YUV pixel format in Capability list
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in skl_primary_formats list.
Don't rely on fb->bits_per_pixel as intel_framebuffer_init is not filling bits_per_pixel field of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.
V2: Don't break NV12 case.
---
IGT changes made for testcase will be sent in separate patch.
drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */
drivers/gpu/drm/i915/intel_pm.c +2 -1
@@ -3164,7 +3164,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,if (fb) { p->plane[0 ].enabled = true; p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; +drm_format_plane_cpp (fb->pixel_format,1 ) : +drm_format_plane_cpp (fb->pixel_format,0 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6823 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 302/302 302/302 SNB 315/315 315/315 IVB 342/342 342/342
BYT -1 285/285 284/285
HSW 378/378 378/378
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BYT igt@gem_partial_pwrite_pread@reads-display PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Can you please add the test case name to the commit message?
Also, this should be split into two patches one addressing the divide by zero error and another one to add plane formats.
Regards,
Sonika
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Kumar, Mahesh
Sent: Friday, July 17, 2015 7:21 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH V2] drm/i915/skl+: Add YUV pixel format in Capability list
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in skl_primary_formats list. Don't rely on fb->bits_per_pixel as intel_framebuffer_init is not filling bits_per_pixel field of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.
V2: Don't break NV12 case.
---
IGT changes made for testcase will be sent in separate patch.
drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */
drivers/gpu/drm/i915/intel_pm.c +2 -1
@@ -3164,7 +3164,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,if (fb) { p->plane[0 ].enabled = true; p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; +drm_format_plane_cpp (fb->pixel_format,1 ) : +drm_format_plane_cpp (fb->pixel_format,0 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];
--
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ok..., Will resubmit the patch with suggested changes.
Regards,
-Mahesh
Quoted 59 lines · Sonika
Can you please add the test case name to the commit message?
Also, this should be split into two patches one addressing the divide by zero error and another one to add plane formats.Regards,
Sonika-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Kumar, Mahesh
Sent: Friday, July 17, 2015 7:21 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH V2] drm/i915/skl+: Add YUV pixel format in Capability listGEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in
skl_primary_formatslist. Don't rely onfb->bits_per_pixelasintel_framebuffer_initis not fillingbits_per_pixelfield of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.V2: Don't break NV12 case.
Signed-off-by Kumar, Mahesh <[email protected]>Cc Konduru, Chandra <[email protected]>---
IGT changes made for testcase will be sent in separate patch.
drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +4
-0@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */ drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -3164,7 +3164,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,if (fb) { p->plane[0 ].enabled = true; p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; +drm_format_plane_cpp (fb->pixel_format,1 ) : +drm_format_plane_cpp (fb->pixel_format,0 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ]; --1.9.1
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915/skl: Avoid using un-initialized bits_per_pixel
Don't rely on fb->bits_per_pixel as intel_framebuffer_init is not filling bits_per_pixel field of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.
--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +2 -1
@@ -3170,7 +3170,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,if (fb) { p->plane[0 ].enabled = true; p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; +drm_format_plane_cpp (fb->pixel_format,1 ) : +drm_format_plane_cpp (fb->pixel_format,0 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/skl+: Add YUV pixel format in Capability list
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in skl_primary_formats list.
Testcase: igt/kms_universal_plane.c
--- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Kumar, Mahesh
Sent: Thursday, September 3, 2015 4:17 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 2/2] drm/i915/skl+: Add YUV pixel format in Capability list
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in skl_primary_formats list.
Testcase: igt/kms_universal_plane.c
--- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */
--
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Sonika
Reviewed-by Sonika Jindal <[email protected]>-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Kumar, Mahesh
Sent: Thursday, September 3, 2015 4:17 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 2/2] drm/i915/skl+: Add YUV pixel format in Capability list
Quoted 6 lines
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in
skl_primary_formatslist.Testcase:
igt/kms_universal_plane.cSigned-off-by Kumar, Mahesh <[email protected]>Cc Konduru, Chandra <[email protected]>
Both patches applied to dinq, thanks.
-Daniel
Quoted 30 lines
--- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/intel_display.c +4
-1@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */ --1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/2] drm/i915/skl: Avoid using un-initialized bits_per_pixel
In reply to Kumar, Mahesh-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Kumar, Mahesh
Sent: Thursday, September 3, 2015 4:17 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 1/2] drm/i915/skl: Avoid using un-initialized bits_per_pixel
Don't rely on fb->bits_per_pixel as intel_framebuffer_init is not filling bits_per_pixel field of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.
--- drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +2 -1
@@ -3170,7 +3170,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,if (fb) { p->plane[0 ].enabled = true; p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; +drm_format_plane_cpp (fb->pixel_format,1 ) : +drm_format_plane_cpp (fb->pixel_format,0 ); p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];
--
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 39 lines · Mahesh
GEN >= 9 supports YUV format for all planes, but it's not exported in Capability list of primary plane. Add YUV formats in
skl_primary_formatslist.
Don't rely onfb->bits_per_pixelasintel_framebuffer_initis not fillingbits_per_pixelfield of fb-struct for YUV pixel format. This leads to divide by zero error during watermark calculation.V2: Don't break NV12 case.
Signed-off-by Kumar, Mahesh <[email protected]>Cc Konduru, Chandra <[email protected]>---
IGT changes made for testcase will be sent in separate patch.
drivers/gpu/drm/i915/intel_display.c | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +4
-0@@ -72,6 +72,10 @@ static const uint32_t skl_primary_formats[] = {DRM_FORMAT_ABGR8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XBGR2101010 , +DRM_FORMAT_YUYV , +DRM_FORMAT_YVYU , +DRM_FORMAT_UYVY , + DRM_FORMAT_VYUY, };/* Cursor formats */ drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc, · line 3168
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +2
-1@@ -3164,7 +3164,8 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc,if (fb) { p->plane[0 ].enabled = true; p->plane[0 ].bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ? -drm_format_plane_cpp (fb->pixel_format,1 ) : fb->bits_per_pixel /8 ; +drm_format_plane_cpp (fb->pixel_format,1 ) : +drm_format_plane_cpp (fb->pixel_format,0 );
Someone should really fix the SKL WM code to treat the Y plane as the normal case and CbCr as the special case. Currently we do just the opposite which leads to this kind of checks all over the place.
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0p->plane[0 ].y_bytes_per_pixel = fb->pixel_format ==DRM_FORMAT_NV12 ?drm_format_plane_cpp (fb->pixel_format,0 ) :0 ; p->plane[0 ].tiling = fb->modifier[0 ];Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx