All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Picture aspect ratio support in DRM layer
@ 2016-08-09 14:55 Shashank Sharma
  2016-08-09 14:55 ` [PATCH v2 1/4] drm: add picture aspect ratio flags Shashank Sharma
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Shashank Sharma @ 2016-08-09 14:55 UTC (permalink / raw)
  To: dri-devel, seanpaul; +Cc: Jose.Abreu, daniel.vetter, intel-gfx, emil.l.velikov

This patch series adds 4 patches.
- The first two patches add aspect ratio support in DRM layes
- Next two patches add new aspect ratios defined in CEA-861-F
  supported for HDMI 2.0 4k modes.

Adding aspect ratio support in DRM layer:
- The CEA videmodes contain aspect ratio information, which we
  parse when we read the modes from EDID. But while transforming
  user_mode to kernel_mode or viceversa, DRM layer lose this
  information.
- HDMI compliance testing for CEA modes, expects the AVI info frames
  to contain exact VIC no for the 'video mode under test'. Now CEA
  modes have different VIC for same modes but different aspect ratio
  for example:
        VIC 2 = 720x480@60 4:3
        VIC 3 = 720x480@60 16:9
  In this way, lack of aspect ratio information, can cause wrong VIC
  no in AVI IF, causing HDMI complaince test to fail.
- This patch set adds code, which embeds the aspect ratio information
  also in DRM video mode flags, and uses it while comparing two modes.

Adding new aspect ratios for HDMI 2.0
- CEA-861-F defines two new aspect ratios, to be used for 4k HDMI 2.0
  modes.
        - 64:27
        - 256:135
Last two patches in the series, adds code to handle these new
aspect ratios.

V2: Fixed review comments from Sean, Emil, Daniel 

Shashank Sharma (4):
  drm: add picture aspect ratio flags
  drm: Add aspect ratio parsing in DRM layer
  video: Add new aspect ratios for HDMI 2.0
  drm: Add and handle new aspect ratios in DRM layer

 drivers/gpu/drm/drm_modes.c | 43 +++++++++++++++++++++++++++++++++++++++++++
 drivers/video/hdmi.c        |  4 ++++
 include/linux/hdmi.h        |  2 ++
 include/uapi/drm/drm_mode.h | 24 +++++++++++++++++++-----
 4 files changed, 68 insertions(+), 5 deletions(-)

-- 
1.9.1

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

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

* [PATCH v2 1/4] drm: add picture aspect ratio flags
  2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
@ 2016-08-09 14:55 ` Shashank Sharma
  2016-10-13 17:24   ` Jim Bride
  2016-08-09 14:55 ` [PATCH v2 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Shashank Sharma @ 2016-08-09 14:55 UTC (permalink / raw)
  To: dri-devel, seanpaul; +Cc: Jose.Abreu, Daniel Vetter, intel-gfx, daniel.vetter

This patch adds drm flag bits for aspect ratio information

Currently drm flag bits don't have field for mode's picture
aspect ratio. This field will help the driver to pick mode with
right aspect ratio, and help in setting right VIC field in avi
infoframes.

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>

V2: Addressed review comments from Sean
- Changed PAR-> PIC_AR

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
---
 include/uapi/drm/drm_mode.h | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 49a7265..77c869d6 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -77,6 +77,19 @@ extern "C" {
 #define  DRM_MODE_FLAG_3D_TOP_AND_BOTTOM	(7<<14)
 #define  DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF	(8<<14)
 
+/* Picture aspect ratio options */
+#define DRM_MODE_PICTURE_ASPECT_NONE		0
+#define DRM_MODE_PICTURE_ASPECT_4_3		1
+#define DRM_MODE_PICTURE_ASPECT_16_9		2
+
+/* Aspect ratio flag bitmask (4 bits 22:19) */
+#define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
+#define  DRM_MODE_FLAG_PIC_AR_NONE \
+			(DRM_MODE_PICTURE_ASPECT_NONE<<19)
+#define  DRM_MODE_FLAG_PIC_AR_4_3 \
+			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
+#define  DRM_MODE_FLAG_PIC_AR_16_9 \
+			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
@@ -92,11 +105,6 @@ extern "C" {
 #define DRM_MODE_SCALE_CENTER		2 /* Centered, no scaling */
 #define DRM_MODE_SCALE_ASPECT		3 /* Full screen, preserve aspect */
 
-/* Picture aspect ratio options */
-#define DRM_MODE_PICTURE_ASPECT_NONE	0
-#define DRM_MODE_PICTURE_ASPECT_4_3	1
-#define DRM_MODE_PICTURE_ASPECT_16_9	2
-
 /* Dithering mode options */
 #define DRM_MODE_DITHERING_OFF	0
 #define DRM_MODE_DITHERING_ON	1
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2 2/4] drm: Add aspect ratio parsing in DRM layer
  2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
  2016-08-09 14:55 ` [PATCH v2 1/4] drm: add picture aspect ratio flags Shashank Sharma
@ 2016-08-09 14:55 ` Shashank Sharma
  2016-10-13 17:26   ` Jim Bride
  2016-08-09 14:55 ` [PATCH v2 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Shashank Sharma @ 2016-08-09 14:55 UTC (permalink / raw)
  To: dri-devel, seanpaul
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, emil.l.velikov, daniel.vetter

Current DRM layer functions don't parse aspect ratio information
while converting a user mode->kernel mode or vice versa. This
causes modeset to pick mode with wrong aspect ratio, eventually
causing failures in HDMI compliance test cases, due to wrong VIC.

This patch adds aspect ratio information in DRM's mode conversion
and mode comparision functions, to make sure kernel picks mode
with right aspect ratio (as per the VIC).

V2: Addressed review comments from Sean:
- Fix spellings/typo
- No need to handle aspect ratio none
- Add a break, for default case too

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Lin, Jia <lin.a.jia@intel.com>
Signed-off-by: Akashdeep Sharma <akashdeep.sharma@intel.com>

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
---
 drivers/gpu/drm/drm_modes.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index fc5040a..9d8f00d 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -969,6 +969,7 @@ bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
 	    mode1->vsync_end == mode2->vsync_end &&
 	    mode1->vtotal == mode2->vtotal &&
 	    mode1->vscan == mode2->vscan &&
+	    mode1->picture_aspect_ratio == mode2->picture_aspect_ratio &&
 	    (mode1->flags & ~DRM_MODE_FLAG_3D_MASK) ==
 	     (mode2->flags & ~DRM_MODE_FLAG_3D_MASK))
 		return true;
@@ -1471,6 +1472,21 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
 	out->vrefresh = in->vrefresh;
 	out->flags = in->flags;
 	out->type = in->type;
+	out->flags &= ~DRM_MODE_FLAG_PIC_AR_MASK;
+
+	switch (in->picture_aspect_ratio) {
+	case HDMI_PICTURE_ASPECT_4_3:
+		out->flags |= DRM_MODE_FLAG_PIC_AR_4_3;
+		break;
+	case HDMI_PICTURE_ASPECT_16_9:
+		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
+		break;
+	case HDMI_PICTURE_ASPECT_RESERVED:
+	default:
+		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
+		break;
+	}
+
 	strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN);
 	out->name[DRM_DISPLAY_MODE_LEN-1] = 0;
 }
@@ -1516,6 +1532,21 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
 	strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN);
 	out->name[DRM_DISPLAY_MODE_LEN-1] = 0;
 
+	/* Clearing picture aspect ratio bits from out flags */
+	out->flags &= ~DRM_MODE_FLAG_PIC_AR_MASK;
+
+	switch (in->flags & DRM_MODE_FLAG_PIC_AR_MASK) {
+	case DRM_MODE_FLAG_PIC_AR_4_3:
+		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_4_3;
+		break;
+	case DRM_MODE_FLAG_PIC_AR_16_9:
+		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
+		break;
+	default:
+		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
+		break;
+	}
+
 	out->status = drm_mode_validate_basic(out);
 	if (out->status != MODE_OK)
 		goto out;
-- 
1.9.1

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

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

* [PATCH v2 3/4] video: Add new aspect ratios for HDMI 2.0
  2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
  2016-08-09 14:55 ` [PATCH v2 1/4] drm: add picture aspect ratio flags Shashank Sharma
  2016-08-09 14:55 ` [PATCH v2 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
@ 2016-08-09 14:55 ` Shashank Sharma
  2016-10-17  6:33   ` Tomi Valkeinen
  2016-08-09 14:55 ` [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Shashank Sharma @ 2016-08-09 14:55 UTC (permalink / raw)
  To: dri-devel, seanpaul
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, emil.l.velikov, daniel.vetter

HDMI 2.0/CEA-861-F introduces two new aspect ratios:
- 64:27
- 256:135

This patch adds enumeration for the new aspect ratios
in the existing aspect ratio list.

V2: rebase

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
---
 drivers/video/hdmi.c | 4 ++++
 include/linux/hdmi.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
index 1626892..1cf907e 100644
--- a/drivers/video/hdmi.c
+++ b/drivers/video/hdmi.c
@@ -533,6 +533,10 @@ hdmi_picture_aspect_get_name(enum hdmi_picture_aspect picture_aspect)
 		return "4:3";
 	case HDMI_PICTURE_ASPECT_16_9:
 		return "16:9";
+	case HDMI_PICTURE_ASPECT_64_27:
+		return "64:27";
+	case HDMI_PICTURE_ASPECT_256_135:
+		return "256:135";
 	case HDMI_PICTURE_ASPECT_RESERVED:
 		return "Reserved";
 	}
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index e974420..edbb4fc 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -78,6 +78,8 @@ enum hdmi_picture_aspect {
 	HDMI_PICTURE_ASPECT_NONE,
 	HDMI_PICTURE_ASPECT_4_3,
 	HDMI_PICTURE_ASPECT_16_9,
+	HDMI_PICTURE_ASPECT_64_27,
+	HDMI_PICTURE_ASPECT_256_135,
 	HDMI_PICTURE_ASPECT_RESERVED,
 };
 
-- 
1.9.1

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

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

* [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer
  2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
                   ` (2 preceding siblings ...)
  2016-08-09 14:55 ` [PATCH v2 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
@ 2016-08-09 14:55 ` Shashank Sharma
  2016-10-13 17:28   ` Jim Bride
  2016-08-09 15:19 ` ✓ Ro.CI.BAT: success for Picture aspect ratio support " Patchwork
  2016-08-18 14:52 ` [PATCH v2 0/4] " Jose Abreu
  5 siblings, 1 reply; 14+ messages in thread
From: Shashank Sharma @ 2016-08-09 14:55 UTC (permalink / raw)
  To: dri-devel, seanpaul
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, emil.l.velikov, daniel.vetter

HDMI 2.0/CEA-861-F introduces two new aspect ratios:
- 64:27
- 256:135

This patch:
-  Adds new DRM flags for to represent these new aspect ratios.
-  Adds new cases to handle these aspect ratios while converting
from user->kernel mode or vise versa.

V2: Rebase

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
---
 drivers/gpu/drm/drm_modes.c | 12 ++++++++++++
 include/uapi/drm/drm_mode.h |  6 ++++++
 2 files changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 9d8f00d..ed1b07b 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1481,6 +1481,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
 	case HDMI_PICTURE_ASPECT_16_9:
 		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
 		break;
+	case HDMI_PICTURE_ASPECT_64_27:
+		out->flags |= DRM_MODE_FLAG_PIC_AR_64_27;
+		break;
+	case DRM_MODE_PICTURE_ASPECT_256_135:
+		out->flags |= DRM_MODE_FLAG_PIC_AR_256_135;
+		break;
 	case HDMI_PICTURE_ASPECT_RESERVED:
 	default:
 		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
@@ -1542,6 +1548,12 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
 	case DRM_MODE_FLAG_PIC_AR_16_9:
 		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
 		break;
+	case DRM_MODE_FLAG_PIC_AR_64_27:
+		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
+		break;
+	case DRM_MODE_FLAG_PIC_AR_256_135:
+		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
+		break;
 	default:
 		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
 		break;
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 77c869d6..4d3429b 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -81,6 +81,8 @@ extern "C" {
 #define DRM_MODE_PICTURE_ASPECT_NONE		0
 #define DRM_MODE_PICTURE_ASPECT_4_3		1
 #define DRM_MODE_PICTURE_ASPECT_16_9		2
+#define DRM_MODE_PICTURE_ASPECT_64_27		3
+#define DRM_MODE_PICTURE_ASPECT_256_135	4
 
 /* Aspect ratio flag bitmask (4 bits 22:19) */
 #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
@@ -90,6 +92,10 @@ extern "C" {
 			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
 #define  DRM_MODE_FLAG_PIC_AR_16_9 \
 			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
+#define  DRM_MODE_FLAG_PIC_AR_64_27 \
+			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
+#define  DRM_MODE_FLAG_PIC_AR_256_135 \
+			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
-- 
1.9.1

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

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

* ✓ Ro.CI.BAT: success for Picture aspect ratio support in DRM layer
  2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
                   ` (3 preceding siblings ...)
  2016-08-09 14:55 ` [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
@ 2016-08-09 15:19 ` Patchwork
  2016-08-18 14:52 ` [PATCH v2 0/4] " Jose Abreu
  5 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2016-08-09 15:19 UTC (permalink / raw)
  To: Shashank Sharma; +Cc: intel-gfx

== Series Details ==

Series: Picture aspect ratio support in DRM layer
URL   : https://patchwork.freedesktop.org/series/10849/
State : success

== Summary ==

Series 10849v1 Picture aspect ratio support in DRM layer
http://patchwork.freedesktop.org/api/1.0/series/10849/revisions/1/mbox


fi-hsw-i7-4770k  total:107  pass:91   dwarn:0   dfail:0   fail:0   skip:15 
fi-kbl-qkkr      total:107  pass:82   dwarn:1   dfail:0   fail:0   skip:23 
fi-skl-i5-6260u  total:107  pass:98   dwarn:0   dfail:0   fail:0   skip:8  
fi-skl-i7-6700k  total:107  pass:84   dwarn:0   dfail:0   fail:0   skip:22 
fi-snb-i7-2600   total:107  pass:77   dwarn:0   dfail:0   fail:0   skip:29 
ro-bdw-i5-5250u  total:107  pass:97   dwarn:0   dfail:0   fail:0   skip:9  
ro-bdw-i7-5600u  total:107  pass:79   dwarn:0   dfail:0   fail:0   skip:27 
ro-byt-n2820     total:240  pass:197  dwarn:0   dfail:0   fail:3   skip:40 
ro-ilk1-i5-650   total:235  pass:173  dwarn:0   dfail:0   fail:2   skip:60 
ro-ivb-i7-3770   total:107  pass:80   dwarn:0   dfail:0   fail:0   skip:26 
ro-skl3-i5-6260u total:107  pass:98   dwarn:0   dfail:0   fail:0   skip:8  
ro-bsw-n3050 failed to connect after reboot
ro-hsw-i3-4010u failed to connect after reboot

Results at /archive/results/CI_IGT_test/RO_Patchwork_1786/

e220d47 drm-intel-nightly: 2016y-08m-09d-09h-18m-12s UTC integration manifest
61c0ca7 drm: Add and handle new aspect ratios in DRM layer
44a1120 video: Add new aspect ratios for HDMI 2.0
ebfc992 drm: Add aspect ratio parsing in DRM layer
8d3d607 drm: add picture aspect ratio flags

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 0/4] Picture aspect ratio support in DRM layer
  2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
                   ` (4 preceding siblings ...)
  2016-08-09 15:19 ` ✓ Ro.CI.BAT: success for Picture aspect ratio support " Patchwork
@ 2016-08-18 14:52 ` Jose Abreu
  5 siblings, 0 replies; 14+ messages in thread
From: Jose Abreu @ 2016-08-18 14:52 UTC (permalink / raw)
  To: Shashank Sharma, dri-devel, seanpaul; +Cc: Jose.Abreu, daniel.vetter, intel-gfx

Hi,


On 09-08-2016 15:55, Shashank Sharma wrote:
> This patch series adds 4 patches.
> - The first two patches add aspect ratio support in DRM layes
> - Next two patches add new aspect ratios defined in CEA-861-F
>   supported for HDMI 2.0 4k modes.
>
> Adding aspect ratio support in DRM layer:
> - The CEA videmodes contain aspect ratio information, which we
>   parse when we read the modes from EDID. But while transforming
>   user_mode to kernel_mode or viceversa, DRM layer lose this
>   information.
> - HDMI compliance testing for CEA modes, expects the AVI info frames
>   to contain exact VIC no for the 'video mode under test'. Now CEA
>   modes have different VIC for same modes but different aspect ratio
>   for example:
>         VIC 2 = 720x480@60 4:3
>         VIC 3 = 720x480@60 16:9
>   In this way, lack of aspect ratio information, can cause wrong VIC
>   no in AVI IF, causing HDMI complaince test to fail.
> - This patch set adds code, which embeds the aspect ratio information
>   also in DRM video mode flags, and uses it while comparing two modes.
>
> Adding new aspect ratios for HDMI 2.0
> - CEA-861-F defines two new aspect ratios, to be used for 4k HDMI 2.0
>   modes.
>         - 64:27
>         - 256:135
> Last two patches in the series, adds code to handle these new
> aspect ratios.
>
> V2: Fixed review comments from Sean, Emil, Daniel 
>
> Shashank Sharma (4):
>   drm: add picture aspect ratio flags
>   drm: Add aspect ratio parsing in DRM layer
>   video: Add new aspect ratios for HDMI 2.0
>   drm: Add and handle new aspect ratios in DRM layer

I am using these patches to run HDMI 2.0 compliance so:

Tested-by: Jose Abreu <joabreu@synopsys.com>

I also have code ready that does the EDID parsing of HDMI 2.0
blocks (HF-VSDB, 4:2:0 VDB and 4:2:0 VCB). The code was tested
and validated against bridge driver dw-hdmi resorting to HDMI
compliance equipment. Besides the parsing I also added support
for YCbCr 4:2:0 encoding. Still, to send the patches I need this
series to get accepted first.

>
>  drivers/gpu/drm/drm_modes.c | 43 +++++++++++++++++++++++++++++++++++++++++++
>  drivers/video/hdmi.c        |  4 ++++
>  include/linux/hdmi.h        |  2 ++
>  include/uapi/drm/drm_mode.h | 24 +++++++++++++++++++-----
>  4 files changed, 68 insertions(+), 5 deletions(-)
>

Best regards,
Jose Miguel Abreu
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 1/4] drm: add picture aspect ratio flags
  2016-08-09 14:55 ` [PATCH v2 1/4] drm: add picture aspect ratio flags Shashank Sharma
@ 2016-10-13 17:24   ` Jim Bride
  0 siblings, 0 replies; 14+ messages in thread
From: Jim Bride @ 2016-10-13 17:24 UTC (permalink / raw)
  To: Shashank Sharma
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, dri-devel, daniel.vetter

On Tue, Aug 09, 2016 at 08:25:47PM +0530, Shashank Sharma wrote:
> This patch adds drm flag bits for aspect ratio information
> 
> Currently drm flag bits don't have field for mode's picture
> aspect ratio. This field will help the driver to pick mode with
> right aspect ratio, and help in setting right VIC field in avi
> infoframes.
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>

The changes make sense according to the relevant specs, and
although I don't have the HW to test them the code looks right.

Reviewed-by: Jim Bride <jim.bride@linux.intel.com>

> 
> V2: Addressed review comments from Sean
> - Changed PAR-> PIC_AR
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  include/uapi/drm/drm_mode.h | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 49a7265..77c869d6 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -77,6 +77,19 @@ extern "C" {
>  #define  DRM_MODE_FLAG_3D_TOP_AND_BOTTOM	(7<<14)
>  #define  DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF	(8<<14)
>  
> +/* Picture aspect ratio options */
> +#define DRM_MODE_PICTURE_ASPECT_NONE		0
> +#define DRM_MODE_PICTURE_ASPECT_4_3		1
> +#define DRM_MODE_PICTURE_ASPECT_16_9		2
> +
> +/* Aspect ratio flag bitmask (4 bits 22:19) */
> +#define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
> +#define  DRM_MODE_FLAG_PIC_AR_NONE \
> +			(DRM_MODE_PICTURE_ASPECT_NONE<<19)
> +#define  DRM_MODE_FLAG_PIC_AR_4_3 \
> +			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
> +#define  DRM_MODE_FLAG_PIC_AR_16_9 \
> +			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
>  
>  /* DPMS flags */
>  /* bit compatible with the xorg definitions. */
> @@ -92,11 +105,6 @@ extern "C" {
>  #define DRM_MODE_SCALE_CENTER		2 /* Centered, no scaling */
>  #define DRM_MODE_SCALE_ASPECT		3 /* Full screen, preserve aspect */
>  
> -/* Picture aspect ratio options */
> -#define DRM_MODE_PICTURE_ASPECT_NONE	0
> -#define DRM_MODE_PICTURE_ASPECT_4_3	1
> -#define DRM_MODE_PICTURE_ASPECT_16_9	2
> -
>  /* Dithering mode options */
>  #define DRM_MODE_DITHERING_OFF	0
>  #define DRM_MODE_DITHERING_ON	1
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 2/4] drm: Add aspect ratio parsing in DRM layer
  2016-08-09 14:55 ` [PATCH v2 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
@ 2016-10-13 17:26   ` Jim Bride
  0 siblings, 0 replies; 14+ messages in thread
From: Jim Bride @ 2016-10-13 17:26 UTC (permalink / raw)
  To: Shashank Sharma
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, dri-devel, daniel.vetter

On Tue, Aug 09, 2016 at 08:25:48PM +0530, Shashank Sharma wrote:
> Current DRM layer functions don't parse aspect ratio information
> while converting a user mode->kernel mode or vice versa. This
> causes modeset to pick mode with wrong aspect ratio, eventually
> causing failures in HDMI compliance test cases, due to wrong VIC.
> 
> This patch adds aspect ratio information in DRM's mode conversion
> and mode comparision functions, to make sure kernel picks mode
> with right aspect ratio (as per the VIC).
> 
> V2: Addressed review comments from Sean:
> - Fix spellings/typo
> - No need to handle aspect ratio none
> - Add a break, for default case too
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Lin, Jia <lin.a.jia@intel.com>
> Signed-off-by: Akashdeep Sharma <akashdeep.sharma@intel.com>

Reviewed-by: Jim Bride <jim.bride@linux.intel.com>

> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  drivers/gpu/drm/drm_modes.c | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index fc5040a..9d8f00d 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -969,6 +969,7 @@ bool drm_mode_equal_no_clocks_no_stereo(const struct drm_display_mode *mode1,
>  	    mode1->vsync_end == mode2->vsync_end &&
>  	    mode1->vtotal == mode2->vtotal &&
>  	    mode1->vscan == mode2->vscan &&
> +	    mode1->picture_aspect_ratio == mode2->picture_aspect_ratio &&
>  	    (mode1->flags & ~DRM_MODE_FLAG_3D_MASK) ==
>  	     (mode2->flags & ~DRM_MODE_FLAG_3D_MASK))
>  		return true;
> @@ -1471,6 +1472,21 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
>  	out->vrefresh = in->vrefresh;
>  	out->flags = in->flags;
>  	out->type = in->type;
> +	out->flags &= ~DRM_MODE_FLAG_PIC_AR_MASK;
> +
> +	switch (in->picture_aspect_ratio) {
> +	case HDMI_PICTURE_ASPECT_4_3:
> +		out->flags |= DRM_MODE_FLAG_PIC_AR_4_3;
> +		break;
> +	case HDMI_PICTURE_ASPECT_16_9:
> +		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
> +		break;
> +	case HDMI_PICTURE_ASPECT_RESERVED:
> +	default:
> +		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
> +		break;
> +	}
> +
>  	strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN);
>  	out->name[DRM_DISPLAY_MODE_LEN-1] = 0;
>  }
> @@ -1516,6 +1532,21 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
>  	strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN);
>  	out->name[DRM_DISPLAY_MODE_LEN-1] = 0;
>  
> +	/* Clearing picture aspect ratio bits from out flags */
> +	out->flags &= ~DRM_MODE_FLAG_PIC_AR_MASK;
> +
> +	switch (in->flags & DRM_MODE_FLAG_PIC_AR_MASK) {
> +	case DRM_MODE_FLAG_PIC_AR_4_3:
> +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_4_3;
> +		break;
> +	case DRM_MODE_FLAG_PIC_AR_16_9:
> +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
> +		break;
> +	default:
> +		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
> +		break;
> +	}
> +
>  	out->status = drm_mode_validate_basic(out);
>  	if (out->status != MODE_OK)
>  		goto out;
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer
  2016-08-09 14:55 ` [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
@ 2016-10-13 17:28   ` Jim Bride
  2016-10-17  6:02     ` [Intel-gfx] " Daniel Vetter
  0 siblings, 1 reply; 14+ messages in thread
From: Jim Bride @ 2016-10-13 17:28 UTC (permalink / raw)
  To: Shashank Sharma
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, dri-devel, daniel.vetter

On Tue, Aug 09, 2016 at 08:25:50PM +0530, Shashank Sharma wrote:
> HDMI 2.0/CEA-861-F introduces two new aspect ratios:
> - 64:27
> - 256:135
> 
> This patch:
> -  Adds new DRM flags for to represent these new aspect ratios.
> -  Adds new cases to handle these aspect ratios while converting
> from user->kernel mode or vise versa.
> 
> V2: Rebase
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  drivers/gpu/drm/drm_modes.c | 12 ++++++++++++
>  include/uapi/drm/drm_mode.h |  6 ++++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 9d8f00d..ed1b07b 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1481,6 +1481,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
>  	case HDMI_PICTURE_ASPECT_16_9:
>  		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
>  		break;
> +	case HDMI_PICTURE_ASPECT_64_27:
> +		out->flags |= DRM_MODE_FLAG_PIC_AR_64_27;
> +		break;
> +	case DRM_MODE_PICTURE_ASPECT_256_135:
> +		out->flags |= DRM_MODE_FLAG_PIC_AR_256_135;
> +		break;
>  	case HDMI_PICTURE_ASPECT_RESERVED:
>  	default:
>  		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
> @@ -1542,6 +1548,12 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
>  	case DRM_MODE_FLAG_PIC_AR_16_9:
>  		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
>  		break;
> +	case DRM_MODE_FLAG_PIC_AR_64_27:
> +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
> +		break;
> +	case DRM_MODE_FLAG_PIC_AR_256_135:
> +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
> +		break;
>  	default:
>  		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
>  		break;
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 77c869d6..4d3429b 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -81,6 +81,8 @@ extern "C" {
>  #define DRM_MODE_PICTURE_ASPECT_NONE		0
>  #define DRM_MODE_PICTURE_ASPECT_4_3		1
>  #define DRM_MODE_PICTURE_ASPECT_16_9		2
> +#define DRM_MODE_PICTURE_ASPECT_64_27		3
> +#define DRM_MODE_PICTURE_ASPECT_256_135	4

Minor nit here, but in my tree the '4' above doesn't line up
with the three previous definitions.  I downloaded the series as
a mbox from patchwork.

Jim

>  
>  /* Aspect ratio flag bitmask (4 bits 22:19) */
>  #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
> @@ -90,6 +92,10 @@ extern "C" {
>  			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
>  #define  DRM_MODE_FLAG_PIC_AR_16_9 \
>  			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
> +#define  DRM_MODE_FLAG_PIC_AR_64_27 \
> +			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
> +#define  DRM_MODE_FLAG_PIC_AR_256_135 \
> +			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
>  
>  /* DPMS flags */
>  /* bit compatible with the xorg definitions. */
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer
  2016-10-13 17:28   ` Jim Bride
@ 2016-10-17  6:02     ` Daniel Vetter
  2016-10-17  7:45       ` Sharma, Shashank
  2016-10-18 17:12       ` Jim Bride
  0 siblings, 2 replies; 14+ messages in thread
From: Daniel Vetter @ 2016-10-17  6:02 UTC (permalink / raw)
  To: Jim Bride; +Cc: Jose.Abreu, Daniel Vetter, intel-gfx, dri-devel, daniel.vetter

On Thu, Oct 13, 2016 at 10:28:14AM -0700, Jim Bride wrote:
> On Tue, Aug 09, 2016 at 08:25:50PM +0530, Shashank Sharma wrote:
> > HDMI 2.0/CEA-861-F introduces two new aspect ratios:
> > - 64:27
> > - 256:135
> > 
> > This patch:
> > -  Adds new DRM flags for to represent these new aspect ratios.
> > -  Adds new cases to handle these aspect ratios while converting
> > from user->kernel mode or vise versa.
> > 
> > V2: Rebase
> > 
> > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Emil Velikov <emil.l.velikov@gmail.com>
> > ---
> >  drivers/gpu/drm/drm_modes.c | 12 ++++++++++++
> >  include/uapi/drm/drm_mode.h |  6 ++++++
> >  2 files changed, 18 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > index 9d8f00d..ed1b07b 100644
> > --- a/drivers/gpu/drm/drm_modes.c
> > +++ b/drivers/gpu/drm/drm_modes.c
> > @@ -1481,6 +1481,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
> >  	case HDMI_PICTURE_ASPECT_16_9:
> >  		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
> >  		break;
> > +	case HDMI_PICTURE_ASPECT_64_27:
> > +		out->flags |= DRM_MODE_FLAG_PIC_AR_64_27;
> > +		break;
> > +	case DRM_MODE_PICTURE_ASPECT_256_135:
> > +		out->flags |= DRM_MODE_FLAG_PIC_AR_256_135;
> > +		break;
> >  	case HDMI_PICTURE_ASPECT_RESERVED:
> >  	default:
> >  		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
> > @@ -1542,6 +1548,12 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
> >  	case DRM_MODE_FLAG_PIC_AR_16_9:
> >  		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
> >  		break;
> > +	case DRM_MODE_FLAG_PIC_AR_64_27:
> > +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
> > +		break;
> > +	case DRM_MODE_FLAG_PIC_AR_256_135:
> > +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
> > +		break;
> >  	default:
> >  		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
> >  		break;
> > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> > index 77c869d6..4d3429b 100644
> > --- a/include/uapi/drm/drm_mode.h
> > +++ b/include/uapi/drm/drm_mode.h
> > @@ -81,6 +81,8 @@ extern "C" {
> >  #define DRM_MODE_PICTURE_ASPECT_NONE		0
> >  #define DRM_MODE_PICTURE_ASPECT_4_3		1
> >  #define DRM_MODE_PICTURE_ASPECT_16_9		2
> > +#define DRM_MODE_PICTURE_ASPECT_64_27		3
> > +#define DRM_MODE_PICTURE_ASPECT_256_135	4
> 
> Minor nit here, but in my tree the '4' above doesn't line up
> with the three previous definitions.  I downloaded the series as
> a mbox from patchwork.

r-b with that bikeshed addressed or not? Also any reason you didn't r-b
patch 3?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 3/4] video: Add new aspect ratios for HDMI 2.0
  2016-08-09 14:55 ` [PATCH v2 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
@ 2016-10-17  6:33   ` Tomi Valkeinen
  0 siblings, 0 replies; 14+ messages in thread
From: Tomi Valkeinen @ 2016-10-17  6:33 UTC (permalink / raw)
  To: Shashank Sharma, dri-devel, seanpaul
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, daniel.vetter


[-- Attachment #1.1.1: Type: text/plain, Size: 1554 bytes --]

On 09/08/16 17:55, Shashank Sharma wrote:
> HDMI 2.0/CEA-861-F introduces two new aspect ratios:
> - 64:27
> - 256:135
> 
> This patch adds enumeration for the new aspect ratios
> in the existing aspect ratio list.
> 
> V2: rebase
> 
> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  drivers/video/hdmi.c | 4 ++++
>  include/linux/hdmi.h | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
> index 1626892..1cf907e 100644
> --- a/drivers/video/hdmi.c
> +++ b/drivers/video/hdmi.c
> @@ -533,6 +533,10 @@ hdmi_picture_aspect_get_name(enum hdmi_picture_aspect picture_aspect)
>  		return "4:3";
>  	case HDMI_PICTURE_ASPECT_16_9:
>  		return "16:9";
> +	case HDMI_PICTURE_ASPECT_64_27:
> +		return "64:27";
> +	case HDMI_PICTURE_ASPECT_256_135:
> +		return "256:135";
>  	case HDMI_PICTURE_ASPECT_RESERVED:
>  		return "Reserved";
>  	}
> diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
> index e974420..edbb4fc 100644
> --- a/include/linux/hdmi.h
> +++ b/include/linux/hdmi.h
> @@ -78,6 +78,8 @@ enum hdmi_picture_aspect {
>  	HDMI_PICTURE_ASPECT_NONE,
>  	HDMI_PICTURE_ASPECT_4_3,
>  	HDMI_PICTURE_ASPECT_16_9,
> +	HDMI_PICTURE_ASPECT_64_27,
> +	HDMI_PICTURE_ASPECT_256_135,
>  	HDMI_PICTURE_ASPECT_RESERVED,
>  };
>  
> 

Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* RE: [Intel-gfx] [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer
  2016-10-17  6:02     ` [Intel-gfx] " Daniel Vetter
@ 2016-10-17  7:45       ` Sharma, Shashank
  2016-10-18 17:12       ` Jim Bride
  1 sibling, 0 replies; 14+ messages in thread
From: Sharma, Shashank @ 2016-10-17  7:45 UTC (permalink / raw)
  To: Daniel Vetter, Jim Bride
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, dri-devel, Vetter, Daniel

> r-b with that bikeshed addressed or not?
Hello Daniel, 
I have already acknowledged this comment, and I am publishing next set today with rebase, addressing this comment. 
So you can consider this one done. 

Regards
Shashank
-----Original Message-----
From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
Sent: Monday, October 17, 2016 11:33 AM
To: Jim Bride <jim.bride@linux.intel.com>
Cc: Sharma, Shashank <shashank.sharma@intel.com>; dri-devel@lists.freedesktop.org; seanpaul@chromium.org; Jose.Abreu@synopsys.com; Daniel Vetter <daniel.vetter@ffwll.ch>; intel-gfx@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer

On Thu, Oct 13, 2016 at 10:28:14AM -0700, Jim Bride wrote:
> On Tue, Aug 09, 2016 at 08:25:50PM +0530, Shashank Sharma wrote:
> > HDMI 2.0/CEA-861-F introduces two new aspect ratios:
> > - 64:27
> > - 256:135
> > 
> > This patch:
> > -  Adds new DRM flags for to represent these new aspect ratios.
> > -  Adds new cases to handle these aspect ratios while converting 
> > from user->kernel mode or vise versa.
> > 
> > V2: Rebase
> > 
> > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Emil Velikov <emil.l.velikov@gmail.com>
> > ---
> >  drivers/gpu/drm/drm_modes.c | 12 ++++++++++++  
> > include/uapi/drm/drm_mode.h |  6 ++++++
> >  2 files changed, 18 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_modes.c 
> > b/drivers/gpu/drm/drm_modes.c index 9d8f00d..ed1b07b 100644
> > --- a/drivers/gpu/drm/drm_modes.c
> > +++ b/drivers/gpu/drm/drm_modes.c
> > @@ -1481,6 +1481,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
> >  	case HDMI_PICTURE_ASPECT_16_9:
> >  		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
> >  		break;
> > +	case HDMI_PICTURE_ASPECT_64_27:
> > +		out->flags |= DRM_MODE_FLAG_PIC_AR_64_27;
> > +		break;
> > +	case DRM_MODE_PICTURE_ASPECT_256_135:
> > +		out->flags |= DRM_MODE_FLAG_PIC_AR_256_135;
> > +		break;
> >  	case HDMI_PICTURE_ASPECT_RESERVED:
> >  	default:
> >  		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE; @@ -1542,6 +1548,12 @@ 
> > int drm_mode_convert_umode(struct drm_display_mode *out,
> >  	case DRM_MODE_FLAG_PIC_AR_16_9:
> >  		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
> >  		break;
> > +	case DRM_MODE_FLAG_PIC_AR_64_27:
> > +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
> > +		break;
> > +	case DRM_MODE_FLAG_PIC_AR_256_135:
> > +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
> > +		break;
> >  	default:
> >  		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
> >  		break;
> > diff --git a/include/uapi/drm/drm_mode.h 
> > b/include/uapi/drm/drm_mode.h index 77c869d6..4d3429b 100644
> > --- a/include/uapi/drm/drm_mode.h
> > +++ b/include/uapi/drm/drm_mode.h
> > @@ -81,6 +81,8 @@ extern "C" {
> >  #define DRM_MODE_PICTURE_ASPECT_NONE		0
> >  #define DRM_MODE_PICTURE_ASPECT_4_3		1
> >  #define DRM_MODE_PICTURE_ASPECT_16_9		2
> > +#define DRM_MODE_PICTURE_ASPECT_64_27		3
> > +#define DRM_MODE_PICTURE_ASPECT_256_135	4
> 
> Minor nit here, but in my tree the '4' above doesn't line up with the 
> three previous definitions.  I downloaded the series as a mbox from 
> patchwork.

r-b with that bikeshed addressed or not? Also any reason you didn't r-b patch 3?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer
  2016-10-17  6:02     ` [Intel-gfx] " Daniel Vetter
  2016-10-17  7:45       ` Sharma, Shashank
@ 2016-10-18 17:12       ` Jim Bride
  1 sibling, 0 replies; 14+ messages in thread
From: Jim Bride @ 2016-10-18 17:12 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Jose.Abreu, Daniel Vetter, intel-gfx, dri-devel, daniel.vetter

On Mon, Oct 17, 2016 at 08:02:49AM +0200, Daniel Vetter wrote:
> On Thu, Oct 13, 2016 at 10:28:14AM -0700, Jim Bride wrote:
> > On Tue, Aug 09, 2016 at 08:25:50PM +0530, Shashank Sharma wrote:
> > > HDMI 2.0/CEA-861-F introduces two new aspect ratios:
> > > - 64:27
> > > - 256:135
> > > 
> > > This patch:
> > > -  Adds new DRM flags for to represent these new aspect ratios.
> > > -  Adds new cases to handle these aspect ratios while converting
> > > from user->kernel mode or vise versa.
> > > 
> > > V2: Rebase
> > > 
> > > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
> > > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Cc: Emil Velikov <emil.l.velikov@gmail.com>
> > > ---
> > >  drivers/gpu/drm/drm_modes.c | 12 ++++++++++++
> > >  include/uapi/drm/drm_mode.h |  6 ++++++
> > >  2 files changed, 18 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > > index 9d8f00d..ed1b07b 100644
> > > --- a/drivers/gpu/drm/drm_modes.c
> > > +++ b/drivers/gpu/drm/drm_modes.c
> > > @@ -1481,6 +1481,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
> > >  	case HDMI_PICTURE_ASPECT_16_9:
> > >  		out->flags |= DRM_MODE_FLAG_PIC_AR_16_9;
> > >  		break;
> > > +	case HDMI_PICTURE_ASPECT_64_27:
> > > +		out->flags |= DRM_MODE_FLAG_PIC_AR_64_27;
> > > +		break;
> > > +	case DRM_MODE_PICTURE_ASPECT_256_135:
> > > +		out->flags |= DRM_MODE_FLAG_PIC_AR_256_135;
> > > +		break;
> > >  	case HDMI_PICTURE_ASPECT_RESERVED:
> > >  	default:
> > >  		out->flags |= DRM_MODE_FLAG_PIC_AR_NONE;
> > > @@ -1542,6 +1548,12 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
> > >  	case DRM_MODE_FLAG_PIC_AR_16_9:
> > >  		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
> > >  		break;
> > > +	case DRM_MODE_FLAG_PIC_AR_64_27:
> > > +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
> > > +		break;
> > > +	case DRM_MODE_FLAG_PIC_AR_256_135:
> > > +		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
> > > +		break;
> > >  	default:
> > >  		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
> > >  		break;
> > > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> > > index 77c869d6..4d3429b 100644
> > > --- a/include/uapi/drm/drm_mode.h
> > > +++ b/include/uapi/drm/drm_mode.h
> > > @@ -81,6 +81,8 @@ extern "C" {
> > >  #define DRM_MODE_PICTURE_ASPECT_NONE		0
> > >  #define DRM_MODE_PICTURE_ASPECT_4_3		1
> > >  #define DRM_MODE_PICTURE_ASPECT_16_9		2
> > > +#define DRM_MODE_PICTURE_ASPECT_64_27		3
> > > +#define DRM_MODE_PICTURE_ASPECT_256_135	4
> > 
> > Minor nit here, but in my tree the '4' above doesn't line up
> > with the three previous definitions.  I downloaded the series as
> > a mbox from patchwork.
> 
> r-b with that bikeshed addressed or not? Also any reason you didn't r-b
> patch 3?

I'm happy with both 3 and 4, so sure.  They both had r-b already by Sean
so I didn't bother tacking my own r-b on there.

Jim


> -Daniel
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-10-18 17:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 14:55 [PATCH v2 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
2016-08-09 14:55 ` [PATCH v2 1/4] drm: add picture aspect ratio flags Shashank Sharma
2016-10-13 17:24   ` Jim Bride
2016-08-09 14:55 ` [PATCH v2 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
2016-10-13 17:26   ` Jim Bride
2016-08-09 14:55 ` [PATCH v2 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
2016-10-17  6:33   ` Tomi Valkeinen
2016-08-09 14:55 ` [PATCH v2 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
2016-10-13 17:28   ` Jim Bride
2016-10-17  6:02     ` [Intel-gfx] " Daniel Vetter
2016-10-17  7:45       ` Sharma, Shashank
2016-10-18 17:12       ` Jim Bride
2016-08-09 15:19 ` ✓ Ro.CI.BAT: success for Picture aspect ratio support " Patchwork
2016-08-18 14:52 ` [PATCH v2 0/4] " Jose Abreu

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.