public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* RE: [PATCH v3 0/4] Picture aspect ratio support in DRM layer
  2016-10-17 11:22 [PATCH v3 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
@ 2016-10-17 11:13 ` Sharma, Shashank
  0 siblings, 0 replies; 11+ messages in thread
From: Sharma, Shashank @ 2016-10-17 11:13 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org, jim.bride@linux.intel.com
  Cc: Vetter, Daniel, intel-gfx@lists.freedesktop.org

Please ignore this series, I mixed up one patch from LSPCON in here. 
Will send the right series in few minutes. 

Regards
Shashank
-----Original Message-----
From: Sharma, Shashank 
Sent: Monday, October 17, 2016 4:52 PM
To: dri-devel@lists.freedesktop.org; jim.bride@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org; Vetter, Daniel <daniel.vetter@intel.com>; Sharma, Shashank <shashank.sharma@intel.com>
Subject: [PATCH v3 0/4] Picture aspect ratio support in DRM layer

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

V3: Fixed review comment from Jim Bride, got r-b for all patches

Shashank Sharma (4):
  drm/i915: Add lspcon resume function
  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/gpu/drm/i915/intel_dp.c     |  7 +++++-
 drivers/gpu/drm/i915/intel_drv.h    |  1 +
 drivers/gpu/drm/i915/intel_lspcon.c |  8 +++++++
 drivers/video/hdmi.c                |  4 ++++
 include/linux/hdmi.h                |  2 ++
 include/uapi/drm/drm_mode.h         |  6 ++++++
 7 files changed, 70 insertions(+), 1 deletion(-)

--
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] 11+ messages in thread

* [PATCH v3 0/4] Picture aspect ratio support in DRM layer
@ 2016-10-17 11:22 Shashank Sharma
  2016-10-17 11:13 ` Sharma, Shashank
  0 siblings, 1 reply; 11+ messages in thread
From: Shashank Sharma @ 2016-10-17 11:22 UTC (permalink / raw)
  To: dri-devel, jim.bride; +Cc: daniel.vetter, intel-gfx

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

V3: Fixed review comment from Jim Bride, got r-b for all patches

Shashank Sharma (4):
  drm/i915: Add lspcon resume function
  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/gpu/drm/i915/intel_dp.c     |  7 +++++-
 drivers/gpu/drm/i915/intel_drv.h    |  1 +
 drivers/gpu/drm/i915/intel_lspcon.c |  8 +++++++
 drivers/video/hdmi.c                |  4 ++++
 include/linux/hdmi.h                |  2 ++
 include/uapi/drm/drm_mode.h         |  6 ++++++
 7 files changed, 70 insertions(+), 1 deletion(-)

-- 
1.9.1

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

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

* Re: [PATCH v3 0/4]: Picture aspect ratio support in DRM layer
  2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
@ 2016-10-17 11:31 ` Jose Abreu
  2016-10-17 11:34   ` Sharma, Shashank
  2016-10-17 11:32 ` [PATCH v3 1/4] drm: add picture aspect ratio flags Shashank Sharma
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Jose Abreu @ 2016-10-17 11:31 UTC (permalink / raw)
  To: Shashank Sharma, dri-devel, jim.bride; +Cc: daniel.vetter, intel-gfx

Hi Shashank,


On 17-10-2016 12:32, 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
> V3: Fixed review comments from Jim Bride, got r-b for all patches
>
> 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 the previous version of these patches, the
functionality remains the same so you can add my reviewed-by for
the whole series if you want. Are you still planning in sending
the patches for the new VIC's introduced in CEA-861-F?

>
>  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] 11+ messages in thread

* [PATCH v3 0/4]: Picture aspect ratio support in DRM layer
@ 2016-10-17 11:32 Shashank Sharma
  2016-10-17 11:31 ` Jose Abreu
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Shashank Sharma @ 2016-10-17 11:32 UTC (permalink / raw)
  To: dri-devel, jim.bride; +Cc: daniel.vetter, intel-gfx

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
V3: Fixed review comments from Jim Bride, got r-b for all patches

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

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

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

* [PATCH v3 1/4] drm: add picture aspect ratio flags
  2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
  2016-10-17 11:31 ` Jose Abreu
@ 2016-10-17 11:32 ` Shashank Sharma
  2016-10-17 11:32 ` [PATCH v3 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Shashank Sharma @ 2016-10-17 11:32 UTC (permalink / raw)
  To: dri-devel, jim.bride
  Cc: Daniel Vetter, daniel.vetter, intel-gfx, Emil Velikov

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>
Reviewed-by: Jim Bride <jim.bride@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>

V2: Addressed review comments from Sean
- Changed PAR-> PIC_AR
V3: Rebase
---
 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 df0e350..5c142b1 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

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

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

* [PATCH v3 2/4] drm: Add aspect ratio parsing in DRM layer
  2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
  2016-10-17 11:31 ` Jose Abreu
  2016-10-17 11:32 ` [PATCH v3 1/4] drm: add picture aspect ratio flags Shashank Sharma
@ 2016-10-17 11:32 ` Shashank Sharma
  2016-10-17 11:32 ` [PATCH v3 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Shashank Sharma @ 2016-10-17 11:32 UTC (permalink / raw)
  To: dri-devel, jim.bride
  Cc: Daniel Vetter, daniel.vetter, intel-gfx, Emil Velikov

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).

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>

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

V3: Rebase
---
 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 53f07ac..fde927a 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -997,6 +997,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;
@@ -1499,6 +1500,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;
 }
@@ -1544,6 +1560,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] 11+ messages in thread

* [PATCH v3 3/4] video: Add new aspect ratios for HDMI 2.0
  2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
                   ` (2 preceding siblings ...)
  2016-10-17 11:32 ` [PATCH v3 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
@ 2016-10-17 11:32 ` Shashank Sharma
  2016-10-17 11:32 ` [PATCH v3 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
  2016-10-17 11:53 ` ✗ Fi.CI.BAT: warning for : Picture aspect ratio support in DRM layer (rev2) Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Shashank Sharma @ 2016-10-17 11:32 UTC (permalink / raw)
  To: dri-devel, jim.bride
  Cc: Daniel Vetter, daniel.vetter, intel-gfx, Emil Velikov

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.

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>

V2: rebase
V3: rebase
---
 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] 11+ messages in thread

* [PATCH v3 4/4] drm: Add and handle new aspect ratios in DRM layer
  2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
                   ` (3 preceding siblings ...)
  2016-10-17 11:32 ` [PATCH v3 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
@ 2016-10-17 11:32 ` Shashank Sharma
  2016-10-17 11:53 ` ✗ Fi.CI.BAT: warning for : Picture aspect ratio support in DRM layer (rev2) Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Shashank Sharma @ 2016-10-17 11:32 UTC (permalink / raw)
  To: dri-devel, jim.bride
  Cc: Daniel Vetter, daniel.vetter, intel-gfx, Emil Velikov

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.

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>

V2: Rebase
V3: Align macro for DRM_MODE_PICTURE_ASPECT_256_135 (Jim Bride)
---
 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 fde927a..173b7d3 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1509,6 +1509,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;
@@ -1570,6 +1576,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 5c142b1..084b50a 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] 11+ messages in thread

* Re: [PATCH v3 0/4]: Picture aspect ratio support in DRM layer
  2016-10-17 11:31 ` Jose Abreu
@ 2016-10-17 11:34   ` Sharma, Shashank
  0 siblings, 0 replies; 11+ messages in thread
From: Sharma, Shashank @ 2016-10-17 11:34 UTC (permalink / raw)
  To: Jose Abreu, dri-devel, jim.bride; +Cc: daniel.vetter, intel-gfx

Regards

Shashank

On 10/17/2016 5:01 PM, Jose Abreu wrote:
> Hi Shashank,
>
>
> On 17-10-2016 12:32, 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
>> V3: Fixed review comments from Jim Bride, got r-b for all patches
>>
>> 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 the previous version of these patches, the
> functionality remains the same so you can add my reviewed-by for
> the whole series if you want.
Thanks Joes. I will add a V4 with your r-b.
> Are you still planning in sending
> the patches for the new VIC's introduced in CEA-861-F?
Yes, the very next step is the patch with new VICs.

Regards
Shashank
>>   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

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

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

* ✗ Fi.CI.BAT: warning for : Picture aspect ratio support in DRM layer (rev2)
  2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
                   ` (4 preceding siblings ...)
  2016-10-17 11:32 ` [PATCH v3 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
@ 2016-10-17 11:53 ` Patchwork
  2016-10-17 11:59   ` Saarinen, Jani
  5 siblings, 1 reply; 11+ messages in thread
From: Patchwork @ 2016-10-17 11:53 UTC (permalink / raw)
  To: Shashank Sharma; +Cc: intel-gfx

== Series Details ==

Series: : Picture aspect ratio support in DRM layer (rev2)
URL   : https://patchwork.freedesktop.org/series/10587/
State : warning

== Summary ==

Series 10587v2 : Picture aspect ratio support in DRM layer
https://patchwork.freedesktop.org/api/1.0/series/10587/revisions/2/mbox/

Test kms_pipe_crc_basic:
        Subgroup bad-source:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup read-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
        Subgroup read-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (fi-ilk-650)
Test vgem_basic:
        Subgroup unload:
                pass       -> SKIP       (fi-skl-6260u)
                skip       -> PASS       (fi-skl-6770hq)
                pass       -> SKIP       (fi-hsw-4770)

fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:246  pass:204  dwarn:0   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:246  pass:212  dwarn:2   dfail:0   fail:1   skip:31 
fi-byt-n2820     total:246  pass:210  dwarn:0   dfail:0   fail:1   skip:35 
fi-hsw-4770      total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23 
fi-hsw-4770r     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-ilk-650       total:246  pass:181  dwarn:3   dfail:0   fail:2   skip:60 
fi-ivb-3520m     total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25 
fi-ivb-3770      total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25 
fi-kbl-7200u     total:246  pass:222  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6260u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15 
fi-skl-6700hq    total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23 
fi-skl-6700k     total:246  pass:221  dwarn:1   dfail:0   fail:0   skip:24 
fi-skl-6770hq    total:246  pass:230  dwarn:1   dfail:0   fail:1   skip:14 
fi-snb-2520m     total:246  pass:210  dwarn:0   dfail:0   fail:0   skip:36 
fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37 

Results at /archive/results/CI_IGT_test/Patchwork_2734/

15dfed2b90e84e7c277f81842fc3f19355293061 drm-intel-nightly: 2016y-10m-16d-23h-15m-00s UTC integration manifest
5c0848b drm: Add and handle new aspect ratios in DRM layer
dca13e5 video: Add new aspect ratios for HDMI 2.0
69f5805 drm: Add aspect ratio parsing in DRM layer
b38c91c 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] 11+ messages in thread

* Re: ✗ Fi.CI.BAT: warning for : Picture aspect ratio support in DRM layer (rev2)
  2016-10-17 11:53 ` ✗ Fi.CI.BAT: warning for : Picture aspect ratio support in DRM layer (rev2) Patchwork
@ 2016-10-17 11:59   ` Saarinen, Jani
  0 siblings, 0 replies; 11+ messages in thread
From: Saarinen, Jani @ 2016-10-17 11:59 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org, Sharma, Shashank

> == Series Details ==
> 
> Series: : Picture aspect ratio support in DRM layer (rev2)
> URL   : https://patchwork.freedesktop.org/series/10587/
> State : warning
> 
> == Summary ==
> 
> Series 10587v2 : Picture aspect ratio support in DRM layer
> https://patchwork.freedesktop.org/api/1.0/series/10587/revisions/2/mbox/
> 
> Test kms_pipe_crc_basic:
>         Subgroup bad-source:
>                 pass       -> DMESG-WARN (fi-ilk-650)
>         Subgroup read-crc-pipe-a-frame-sequence:
>                 pass       -> DMESG-WARN (fi-ilk-650)
>         Subgroup read-crc-pipe-b-frame-sequence:
>                 pass       -> DMESG-WARN (fi-ilk-650)
Same old https://bugs.freedesktop.org/show_bug.cgi?id=98251 to all
	
 [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder B FIFO underrun
 [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun

> Test vgem_basic:
>         Subgroup unload:
>                 pass       -> SKIP       (fi-skl-6260u)
>                 skip       -> PASS       (fi-skl-6770hq)
>                 pass       -> SKIP       (fi-hsw-4770)
> 
> fi-bdw-5557u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15
> fi-bsw-n3050     total:246  pass:204  dwarn:0   dfail:0   fail:0   skip:42
> fi-bxt-t5700     total:246  pass:216  dwarn:0   dfail:0   fail:0   skip:30
> fi-byt-j1900     total:246  pass:212  dwarn:2   dfail:0   fail:1   skip:31
> fi-byt-n2820     total:246  pass:210  dwarn:0   dfail:0   fail:1   skip:35
> fi-hsw-4770      total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23
> fi-hsw-4770r     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22
> fi-ilk-650       total:246  pass:181  dwarn:3   dfail:0   fail:2   skip:60
> fi-ivb-3520m     total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25
> fi-ivb-3770      total:246  pass:221  dwarn:0   dfail:0   fail:0   skip:25
> fi-kbl-7200u     total:246  pass:222  dwarn:0   dfail:0   fail:0   skip:24
> fi-skl-6260u     total:246  pass:231  dwarn:0   dfail:0   fail:0   skip:15
> fi-skl-6700hq    total:246  pass:223  dwarn:0   dfail:0   fail:0   skip:23
> fi-skl-6700k     total:246  pass:221  dwarn:1   dfail:0   fail:0   skip:24
> fi-skl-6770hq    total:246  pass:230  dwarn:1   dfail:0   fail:1   skip:14
> fi-snb-2520m     total:246  pass:210  dwarn:0   dfail:0   fail:0   skip:36
> fi-snb-2600      total:246  pass:209  dwarn:0   dfail:0   fail:0   skip:37
> 
> Results at /archive/results/CI_IGT_test/Patchwork_2734/
> 
> 15dfed2b90e84e7c277f81842fc3f19355293061 drm-intel-nightly: 2016y-10m-
> 16d-23h-15m-00s UTC integration manifest 5c0848b drm: Add and handle
> new aspect ratios in DRM layer
> dca13e5 video: Add new aspect ratios for HDMI 2.0
> 69f5805 drm: Add aspect ratio parsing in DRM layer b38c91c drm: add picture
> aspect ratio flags
> 

Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo



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

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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 11:32 [PATCH v3 0/4]: Picture aspect ratio support in DRM layer Shashank Sharma
2016-10-17 11:31 ` Jose Abreu
2016-10-17 11:34   ` Sharma, Shashank
2016-10-17 11:32 ` [PATCH v3 1/4] drm: add picture aspect ratio flags Shashank Sharma
2016-10-17 11:32 ` [PATCH v3 2/4] drm: Add aspect ratio parsing in DRM layer Shashank Sharma
2016-10-17 11:32 ` [PATCH v3 3/4] video: Add new aspect ratios for HDMI 2.0 Shashank Sharma
2016-10-17 11:32 ` [PATCH v3 4/4] drm: Add and handle new aspect ratios in DRM layer Shashank Sharma
2016-10-17 11:53 ` ✗ Fi.CI.BAT: warning for : Picture aspect ratio support in DRM layer (rev2) Patchwork
2016-10-17 11:59   ` Saarinen, Jani
  -- strict thread matches above, loose matches on Subject: below --
2016-10-17 11:22 [PATCH v3 0/4] Picture aspect ratio support in DRM layer Shashank Sharma
2016-10-17 11:13 ` Sharma, Shashank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox