All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: set the active aspect ratio as per mode
@ 2014-03-10  3:44 Shirish S
  2014-03-12 15:19 ` Tomasz Figa
  0 siblings, 1 reply; 13+ messages in thread
From: Shirish S @ 2014-03-10  3:44 UTC (permalink / raw)
  To: dri-devel, inki.dae; +Cc: shirish, Shirish S

now that the drm_display_mode also provides aspect
ratio for all resolutions, this patch adds its usage
to set the active aspect ratio of AVI info frame
packets as per CEA-861-D standard's Table 9.

This is also needed to abide by the 7-27
compliance test of HDMI.

Signed-off-by: Shirish S <s.shirish@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |   33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index c021ddc..8aca52a 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -53,8 +53,6 @@
 /* AVI header and aspect ratio */
 #define HDMI_AVI_VERSION		0x02
 #define HDMI_AVI_LENGTH		0x0D
-#define AVI_PIC_ASPECT_RATIO_16_9	(2 << 4)
-#define AVI_SAME_AS_PIC_ASPECT_RATIO	8
 
 /* AUI header info */
 #define HDMI_AUI_VERSION	0x01
@@ -65,6 +63,12 @@ enum hdmi_type {
 	HDMI_TYPE14,
 };
 
+enum active_aspect_ratio {
+	AVI_SAME_AS_PIC_ASPECT_RATIO = 8,
+	AVI_4_3_Center_RATIO,
+	AVI_16_9_Center_RATIO,
+};
+
 struct hdmi_resources {
 	struct clk			*hdmi;
 	struct clk			*sclk_hdmi;
@@ -162,6 +166,7 @@ struct hdmi_v14_conf {
 struct hdmi_conf_regs {
 	int pixel_clock;
 	int cea_video_id;
+	enum hdmi_picture_aspect aspect_ratio;
 	union {
 		struct hdmi_v13_conf v13_conf;
 		struct hdmi_v14_conf v14_conf;
@@ -668,7 +673,6 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
 {
 	u32 hdr_sum;
 	u8 chksum;
-	u32 aspect_ratio;
 	u32 mod;
 	u32 vic;
 
@@ -697,10 +701,25 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
 			AVI_ACTIVE_FORMAT_VALID |
 			AVI_UNDERSCANNED_DISPLAY_VALID);
 
-		aspect_ratio = AVI_PIC_ASPECT_RATIO_16_9;
-
-		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
+		/*
+		 * Set the aspect ratio as per the mode, mentioned in
+		 * Table 9 AVI InfoFrame Data Byte 2 of CEA-861-D Standard
+		 */
+		switch (hdata->mode_conf.aspect_ratio) {
+		case HDMI_PICTURE_ASPECT_4_3:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
+				AVI_4_3_Center_RATIO);
+			break;
+		case HDMI_PICTURE_ASPECT_16_9:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
+				AVI_16_9_Center_RATIO);
+			break;
+		case HDMI_PICTURE_ASPECT_NONE:
+		default:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
 				AVI_SAME_AS_PIC_ASPECT_RATIO);
+			break;
+		}
 
 		vic = hdata->mode_conf.cea_video_id;
 		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(4), vic);
@@ -1421,6 +1440,7 @@ static void hdmi_v13_mode_set(struct hdmi_context *hdata,
 	hdata->mode_conf.cea_video_id =
 		drm_match_cea_mode((struct drm_display_mode *)m);
 	hdata->mode_conf.pixel_clock = m->clock * 1000;
+	hdata->mode_conf.aspect_ratio = m->picture_aspect_ratio;
 
 	hdmi_set_reg(core->h_blank, 2, m->htotal - m->hdisplay);
 	hdmi_set_reg(core->h_v_line, 3, (m->htotal << 12) | m->vtotal);
@@ -1517,6 +1537,7 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata,
 	hdata->mode_conf.cea_video_id =
 		drm_match_cea_mode((struct drm_display_mode *)m);
 	hdata->mode_conf.pixel_clock = m->clock * 1000;
+	hdata->mode_conf.aspect_ratio = m->picture_aspect_ratio;
 
 	hdmi_set_reg(core->h_blank, 2, m->htotal - m->hdisplay);
 	hdmi_set_reg(core->v_line, 2, m->vtotal);
-- 
1.7.10.4

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

* [PATCH] drm/exynos: set the active aspect ratio as per mode
@ 2014-03-11  9:00 Shirish S
  0 siblings, 0 replies; 13+ messages in thread
From: Shirish S @ 2014-03-11  9:00 UTC (permalink / raw)
  To: dri-devel, inki.dae; +Cc: shirish, Shirish S

now that the drm_display_mode also provides aspect
ratio for all resolutions, this patch adds its usage
to set the active aspect ratio of AVI info frame
packets as per CEA-861-D standard's Table 9.

This is also needed to abide by the 7-27
compliance test of HDMI.

V2: rebased it to TODO branch, and
    made the orr'ing logic correct

Signed-off-by: Shirish S <s.shirish@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |   38 +++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index c021ddc..bba54c9 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -53,8 +53,6 @@
 /* AVI header and aspect ratio */
 #define HDMI_AVI_VERSION		0x02
 #define HDMI_AVI_LENGTH		0x0D
-#define AVI_PIC_ASPECT_RATIO_16_9	(2 << 4)
-#define AVI_SAME_AS_PIC_ASPECT_RATIO	8
 
 /* AUI header info */
 #define HDMI_AUI_VERSION	0x01
@@ -65,6 +63,12 @@ enum hdmi_type {
 	HDMI_TYPE14,
 };
 
+enum active_aspect_ratio {
+	AVI_SAME_AS_PIC_ASPECT_RATIO = 8,
+	AVI_4_3_Center_RATIO,
+	AVI_16_9_Center_RATIO,
+};
+
 struct hdmi_resources {
 	struct clk			*hdmi;
 	struct clk			*sclk_hdmi;
@@ -162,6 +166,7 @@ struct hdmi_v14_conf {
 struct hdmi_conf_regs {
 	int pixel_clock;
 	int cea_video_id;
+	enum hdmi_picture_aspect aspect_ratio;
 	union {
 		struct hdmi_v13_conf v13_conf;
 		struct hdmi_v14_conf v14_conf;
@@ -668,7 +673,6 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
 {
 	u32 hdr_sum;
 	u8 chksum;
-	u32 aspect_ratio;
 	u32 mod;
 	u32 vic;
 
@@ -697,10 +701,28 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
 			AVI_ACTIVE_FORMAT_VALID |
 			AVI_UNDERSCANNED_DISPLAY_VALID);
 
-		aspect_ratio = AVI_PIC_ASPECT_RATIO_16_9;
-
-		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
-				AVI_SAME_AS_PIC_ASPECT_RATIO);
+		/*
+		 * Set the aspect ratio as per the mode, mentioned in
+		 * Table 9 AVI InfoFrame Data Byte 2 of CEA-861-D Standard
+		 */
+		switch (hdata->mode_conf.aspect_ratio) {
+		case HDMI_PICTURE_ASPECT_4_3:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
+			 (hdata->mode_conf.aspect_ratio << 4) |
+				 AVI_4_3_Center_RATIO);
+			break;
+		case HDMI_PICTURE_ASPECT_16_9:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
+			 (hdata->mode_conf.aspect_ratio << 4) |
+				 AVI_16_9_Center_RATIO);
+			break;
+		case HDMI_PICTURE_ASPECT_NONE:
+		default:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
+			 (hdata->mode_conf.aspect_ratio << 4) |
+				 AVI_SAME_AS_PIC_ASPECT_RATIO);
+			break;
+		}
 
 		vic = hdata->mode_conf.cea_video_id;
 		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(4), vic);
@@ -1421,6 +1443,7 @@ static void hdmi_v13_mode_set(struct hdmi_context *hdata,
 	hdata->mode_conf.cea_video_id =
 		drm_match_cea_mode((struct drm_display_mode *)m);
 	hdata->mode_conf.pixel_clock = m->clock * 1000;
+	hdata->mode_conf.aspect_ratio = m->picture_aspect_ratio;
 
 	hdmi_set_reg(core->h_blank, 2, m->htotal - m->hdisplay);
 	hdmi_set_reg(core->h_v_line, 3, (m->htotal << 12) | m->vtotal);
@@ -1517,6 +1540,7 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata,
 	hdata->mode_conf.cea_video_id =
 		drm_match_cea_mode((struct drm_display_mode *)m);
 	hdata->mode_conf.pixel_clock = m->clock * 1000;
+	hdata->mode_conf.aspect_ratio = m->picture_aspect_ratio;
 
 	hdmi_set_reg(core->h_blank, 2, m->htotal - m->hdisplay);
 	hdmi_set_reg(core->v_line, 2, m->vtotal);
-- 
1.7.10.4

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

* Re: [PATCH] drm/exynos: set the active aspect ratio as per mode
  2014-03-10  3:44 Shirish S
@ 2014-03-12 15:19 ` Tomasz Figa
  2014-03-13  3:15   ` Shirish S
  0 siblings, 1 reply; 13+ messages in thread
From: Tomasz Figa @ 2014-03-12 15:19 UTC (permalink / raw)
  To: Shirish S, dri-devel, inki.dae; +Cc: shirish

Hi Shirish,

On 10.03.2014 04:44, Shirish S wrote:
> now that the drm_display_mode also provides aspect
> ratio for all resolutions, this patch adds its usage
> to set the active aspect ratio of AVI info frame
> packets as per CEA-861-D standard's Table 9.
>
> This is also needed to abide by the 7-27
> compliance test of HDMI.
>
> Signed-off-by: Shirish S <s.shirish@samsung.com>
> ---
>   drivers/gpu/drm/exynos/exynos_hdmi.c |   33 +++++++++++++++++++++++++++------
>   1 file changed, 27 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index c021ddc..8aca52a 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -53,8 +53,6 @@
>   /* AVI header and aspect ratio */
>   #define HDMI_AVI_VERSION		0x02
>   #define HDMI_AVI_LENGTH		0x0D
> -#define AVI_PIC_ASPECT_RATIO_16_9	(2 << 4)
> -#define AVI_SAME_AS_PIC_ASPECT_RATIO	8
>
>   /* AUI header info */
>   #define HDMI_AUI_VERSION	0x01
> @@ -65,6 +63,12 @@ enum hdmi_type {
>   	HDMI_TYPE14,
>   };
>
> +enum active_aspect_ratio {
> +	AVI_SAME_AS_PIC_ASPECT_RATIO = 8,
> +	AVI_4_3_Center_RATIO,
> +	AVI_16_9_Center_RATIO,
> +};
> +

CodingStyle: Please define these using preprocessor macros, since they 
are bitfield values. Also coding style implies using uppercase for 
constants.

>   struct hdmi_resources {
>   	struct clk			*hdmi;
>   	struct clk			*sclk_hdmi;
> @@ -162,6 +166,7 @@ struct hdmi_v14_conf {
>   struct hdmi_conf_regs {
>   	int pixel_clock;
>   	int cea_video_id;
> +	enum hdmi_picture_aspect aspect_ratio;
>   	union {
>   		struct hdmi_v13_conf v13_conf;
>   		struct hdmi_v14_conf v14_conf;
> @@ -668,7 +673,6 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
>   {
>   	u32 hdr_sum;
>   	u8 chksum;
> -	u32 aspect_ratio;
>   	u32 mod;
>   	u32 vic;
>
> @@ -697,10 +701,25 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
>   			AVI_ACTIVE_FORMAT_VALID |
>   			AVI_UNDERSCANNED_DISPLAY_VALID);
>
> -		aspect_ratio = AVI_PIC_ASPECT_RATIO_16_9;
> -
> -		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
> +		/*
> +		 * Set the aspect ratio as per the mode, mentioned in
> +		 * Table 9 AVI InfoFrame Data Byte 2 of CEA-861-D Standard
> +		 */
> +		switch (hdata->mode_conf.aspect_ratio) {
> +		case HDMI_PICTURE_ASPECT_4_3:
> +			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
> +				AVI_4_3_Center_RATIO);

CodingStyle: Please keep wrapped function calls aligned using tabs at 
least to the opening parenthesis.

> +			break;
> +		case HDMI_PICTURE_ASPECT_16_9:
> +			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
> +				AVI_16_9_Center_RATIO);

Ditto.

> +			break;
> +		case HDMI_PICTURE_ASPECT_NONE:
> +		default:
> +			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
>   				AVI_SAME_AS_PIC_ASPECT_RATIO);

Ditto.

Best regards,
Tomasz

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

* Re: [PATCH] drm/exynos: set the active aspect ratio as per mode
  2014-03-12 15:19 ` Tomasz Figa
@ 2014-03-13  3:15   ` Shirish S
  0 siblings, 0 replies; 13+ messages in thread
From: Shirish S @ 2014-03-13  3:15 UTC (permalink / raw)
  To: Tomasz Figa; +Cc: Shirish S, Shirish S, dri-devel

Hi Tomasz,

On Wed, Mar 12, 2014 at 8:19 AM, Tomasz Figa <t.figa@samsung.com> wrote:
> Hi Shirish,
>
>
> On 10.03.2014 04:44, Shirish S wrote:
>>
>> now that the drm_display_mode also provides aspect
>> ratio for all resolutions, this patch adds its usage
>> to set the active aspect ratio of AVI info frame
>> packets as per CEA-861-D standard's Table 9.
>>
>> This is also needed to abide by the 7-27
>> compliance test of HDMI.
>>
>> Signed-off-by: Shirish S <s.shirish@samsung.com>
>> ---
>>   drivers/gpu/drm/exynos/exynos_hdmi.c |   33
>> +++++++++++++++++++++++++++------
>>   1 file changed, 27 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index c021ddc..8aca52a 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -53,8 +53,6 @@
>>   /* AVI header and aspect ratio */
>>   #define HDMI_AVI_VERSION              0x02
>>   #define HDMI_AVI_LENGTH               0x0D
>> -#define AVI_PIC_ASPECT_RATIO_16_9      (2 << 4)
>> -#define AVI_SAME_AS_PIC_ASPECT_RATIO   8
>>
>>   /* AUI header info */
>>   #define HDMI_AUI_VERSION      0x01
>> @@ -65,6 +63,12 @@ enum hdmi_type {
>>         HDMI_TYPE14,
>>   };
>>
>> +enum active_aspect_ratio {
>> +       AVI_SAME_AS_PIC_ASPECT_RATIO = 8,
>> +       AVI_4_3_Center_RATIO,
>> +       AVI_16_9_Center_RATIO,
>> +};
>> +
>
>
> CodingStyle: Please define these using preprocessor macros, since they are
> bitfield values. Also coding style implies using uppercase for constants.
>
>
Agreed, updated in the next path set.
>>   struct hdmi_resources {
>>         struct clk                      *hdmi;
>>         struct clk                      *sclk_hdmi;
>> @@ -162,6 +166,7 @@ struct hdmi_v14_conf {
>>   struct hdmi_conf_regs {
>>         int pixel_clock;
>>         int cea_video_id;
>> +       enum hdmi_picture_aspect aspect_ratio;
>>         union {
>>                 struct hdmi_v13_conf v13_conf;
>>                 struct hdmi_v14_conf v14_conf;
>> @@ -668,7 +673,6 @@ static void hdmi_reg_infoframe(struct hdmi_context
>> *hdata,
>>   {
>>         u32 hdr_sum;
>>         u8 chksum;
>> -       u32 aspect_ratio;
>>         u32 mod;
>>         u32 vic;
>>
>> @@ -697,10 +701,25 @@ static void hdmi_reg_infoframe(struct hdmi_context
>> *hdata,
>>                         AVI_ACTIVE_FORMAT_VALID |
>>                         AVI_UNDERSCANNED_DISPLAY_VALID);
>>
>> -               aspect_ratio = AVI_PIC_ASPECT_RATIO_16_9;
>> -
>> -               hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
>> +               /*
>> +                * Set the aspect ratio as per the mode, mentioned in
>> +                * Table 9 AVI InfoFrame Data Byte 2 of CEA-861-D Standard
>> +                */
>> +               switch (hdata->mode_conf.aspect_ratio) {
>> +               case HDMI_PICTURE_ASPECT_4_3:
>> +                       hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
>> aspect_ratio |
>> +                               AVI_4_3_Center_RATIO);
>
>
> CodingStyle: Please keep wrapped function calls aligned using tabs at least
> to the opening parenthesis.
>
>
>> +                       break;
>> +               case HDMI_PICTURE_ASPECT_16_9:
>> +                       hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
>> aspect_ratio |
>> +                               AVI_16_9_Center_RATIO);
>
>
> Ditto.
>
Agreed, updated in next patch set.
>
>> +                       break;
>> +               case HDMI_PICTURE_ASPECT_NONE:
>> +               default:
>> +                       hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
>> aspect_ratio |
>>                                 AVI_SAME_AS_PIC_ASPECT_RATIO);
>
>
> Ditto.
>
> Best regards,
> Tomasz
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

Thanks & Regards,
Shirish S

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

* [PATCH] drm/exynos: add phy settings for RB resolutions
@ 2014-03-13  5:28 Shirish S
  2014-03-13  5:28 ` [PATCH] drm/exynos: set the active aspect ratio as per mode Shirish S
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Shirish S @ 2014-03-13  5:28 UTC (permalink / raw)
  To: dri-devel, inki.dae, t.figa; +Cc: shirish, Shirish S

This patch adds support for the below mentioned
pixel clocks in Exynos5250.
Without them, following display modes won’t
be supported:

71 MHz 	- 1280x800@60Hz RB
73.25 MHz 	- 800x600@120Hz RB
88.75 MHz 	- 1440x900@60Hz RB
115.5 MHz 	- 1024x768@120Hz RB
119 MHz 	- 1680x1050@60Hz RB

Signed-off-by: Shirish S <s.shirish@samsung.com>
---
V2: Incorporated review comments

 drivers/gpu/drm/exynos/exynos_hdmi.c |   45 ++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 12fdf55..406d89d 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -304,6 +304,24 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = {
 		},
 	},
 	{
+		.pixel_clock = 71000000,
+		.conf = {
+			0x01, 0x91, 0x1e, 0x15, 0x40, 0x3c, 0xce, 0x08,
+			0x04, 0x20, 0xb2, 0xd8, 0x45, 0xa0, 0xac, 0x80,
+			0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
+			0x54, 0xad, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
+		},
+	},
+	{
+		.pixel_clock = 73250000,
+		.conf = {
+			0x01, 0xd1, 0x1f, 0x15, 0x40, 0x18, 0xe9, 0x08,
+			0x02, 0xa0, 0xb7, 0xd8, 0x45, 0xa0, 0xac, 0x80,
+			0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
+			0x54, 0xa8, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
+		},
+	},
+	{
 		.pixel_clock = 74176000,
 		.conf = {
 			0x01, 0xd1, 0x3e, 0x35, 0x40, 0x5b, 0xde, 0x08,
@@ -331,6 +349,15 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = {
 		},
 	},
 	{
+		.pixel_clock = 88750000,
+		.conf = {
+			0x01, 0x91, 0x25, 0x17, 0x40, 0x30, 0xfe, 0x08,
+			0x06, 0x20, 0xde, 0xd8, 0x45, 0xa0, 0xac, 0x80,
+			0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
+			0x54, 0x8a, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
+		},
+	},
+	{
 		.pixel_clock = 106500000,
 		.conf = {
 			0x01, 0xd1, 0x2c, 0x12, 0x40, 0x0c, 0x09, 0x08,
@@ -349,6 +376,24 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = {
 		},
 	},
 	{
+		.pixel_clock = 115500000,
+		.conf = {
+			0x01, 0xd1, 0x30, 0x1a, 0x40, 0x40, 0x10, 0x04,
+			0x04, 0xa0, 0x21, 0xd9, 0x45, 0xa0, 0xac, 0x80,
+			0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
+			0x54, 0xaa, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
+		},
+	},
+	{
+		.pixel_clock = 119000000,
+		.conf = {
+			0x01, 0x91, 0x32, 0x14, 0x40, 0x60, 0xd8, 0x08,
+			0x06, 0x20, 0x2a, 0xd9, 0x45, 0xa0, 0xac, 0x80,
+			0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
+			0x54, 0x9d, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
+		},
+	},
+	{
 		.pixel_clock = 146250000,
 		.conf = {
 			0x01, 0xd1, 0x3d, 0x15, 0x40, 0x18, 0xfd, 0x08,
-- 
1.7.10.4

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

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

* [PATCH] drm/exynos: set the active aspect ratio as per mode
  2014-03-13  5:28 [PATCH] drm/exynos: add phy settings for RB resolutions Shirish S
@ 2014-03-13  5:28 ` Shirish S
  2014-03-18 13:04   ` Tomasz Figa
  2014-03-18 13:01 ` [PATCH] drm/exynos: add phy settings for RB resolutions Tomasz Figa
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Shirish S @ 2014-03-13  5:28 UTC (permalink / raw)
  To: dri-devel, inki.dae, t.figa; +Cc: shirish, Shirish S

Now that the drm_display_mode also provides aspect
ratio for all resolutions, this patch adds its usage
to set the active aspect ratio of AVI info frame
packets as per CEA-861-D standard's Table 9.

This is also needed to abide by the 7-27
compliance test of HDMI.

Signed-off-by: Shirish S <s.shirish@samsung.com>
---
V2: rebased on new branch
V3: Incorporated review comments

 drivers/gpu/drm/exynos/exynos_hdmi.c |   35 +++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 12fdf55..9b0b617 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -53,12 +53,13 @@
 /* AVI header and aspect ratio */
 #define HDMI_AVI_VERSION		0x02
 #define HDMI_AVI_LENGTH		0x0D
-#define AVI_PIC_ASPECT_RATIO_16_9	(2 << 4)
-#define AVI_SAME_AS_PIC_ASPECT_RATIO	8
 
 /* AUI header info */
 #define HDMI_AUI_VERSION	0x01
 #define HDMI_AUI_LENGTH	0x0A
+#define	AVI_SAME_AS_PIC_ASPECT_RATIO 0x8
+#define	AVI_4_3_CENTER_RATIO	0x9
+#define	AVI_16_9_CENTER_RATIO	0xa
 
 enum hdmi_type {
 	HDMI_TYPE13,
@@ -162,6 +163,7 @@ struct hdmi_v14_conf {
 struct hdmi_conf_regs {
 	int pixel_clock;
 	int cea_video_id;
+	enum hdmi_picture_aspect aspect_ratio;
 	union {
 		struct hdmi_v13_conf v13_conf;
 		struct hdmi_v14_conf v14_conf;
@@ -669,7 +671,6 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
 {
 	u32 hdr_sum;
 	u8 chksum;
-	u32 aspect_ratio;
 	u32 mod;
 	u32 vic;
 
@@ -698,10 +699,28 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata,
 			AVI_ACTIVE_FORMAT_VALID |
 			AVI_UNDERSCANNED_DISPLAY_VALID);
 
-		aspect_ratio = AVI_PIC_ASPECT_RATIO_16_9;
-
-		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2), aspect_ratio |
-				AVI_SAME_AS_PIC_ASPECT_RATIO);
+		/*
+		 * Set the aspect ratio as per the mode, mentioned in
+		 * Table 9 AVI InfoFrame Data Byte 2 of CEA-861-D Standard
+		 */
+		switch (hdata->mode_conf.aspect_ratio) {
+		case HDMI_PICTURE_ASPECT_4_3:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
+					hdata->mode_conf.aspect_ratio |
+					AVI_4_3_CENTER_RATIO);
+			break;
+		case HDMI_PICTURE_ASPECT_16_9:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
+					hdata->mode_conf.aspect_ratio |
+					AVI_16_9_CENTER_RATIO);
+			break;
+		case HDMI_PICTURE_ASPECT_NONE:
+		default:
+			hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(2),
+					hdata->mode_conf.aspect_ratio |
+					AVI_SAME_AS_PIC_ASPECT_RATIO);
+			break;
+		}
 
 		vic = hdata->mode_conf.cea_video_id;
 		hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(4), vic);
@@ -1519,6 +1538,7 @@ static void hdmi_v13_mode_set(struct hdmi_context *hdata,
 	hdata->mode_conf.cea_video_id =
 		drm_match_cea_mode((struct drm_display_mode *)m);
 	hdata->mode_conf.pixel_clock = m->clock * 1000;
+	hdata->mode_conf.aspect_ratio = m->picture_aspect_ratio;
 
 	hdmi_set_reg(core->h_blank, 2, m->htotal - m->hdisplay);
 	hdmi_set_reg(core->h_v_line, 3, (m->htotal << 12) | m->vtotal);
@@ -1615,6 +1635,7 @@ static void hdmi_v14_mode_set(struct hdmi_context *hdata,
 	hdata->mode_conf.cea_video_id =
 		drm_match_cea_mode((struct drm_display_mode *)m);
 	hdata->mode_conf.pixel_clock = m->clock * 1000;
+	hdata->mode_conf.aspect_ratio = m->picture_aspect_ratio;
 
 	hdmi_set_reg(core->h_blank, 2, m->htotal - m->hdisplay);
 	hdmi_set_reg(core->v_line, 2, m->vtotal);
-- 
1.7.10.4

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

* Re: [PATCH] drm/exynos: add phy settings for RB resolutions
  2014-03-13  5:28 [PATCH] drm/exynos: add phy settings for RB resolutions Shirish S
  2014-03-13  5:28 ` [PATCH] drm/exynos: set the active aspect ratio as per mode Shirish S
@ 2014-03-18 13:01 ` Tomasz Figa
  2014-03-19  8:25 ` Inki Dae
  2014-03-20  7:35 ` Stéphane Marchesin
  3 siblings, 0 replies; 13+ messages in thread
From: Tomasz Figa @ 2014-03-18 13:01 UTC (permalink / raw)
  To: Shirish S, dri-devel, inki.dae; +Cc: shirish

Hi Shirish,

On 13.03.2014 06:28, Shirish S wrote:
> This patch adds support for the below mentioned
> pixel clocks in Exynos5250.
> Without them, following display modes won’t
> be supported:
>
> 71 MHz 	- 1280x800@60Hz RB
> 73.25 MHz 	- 800x600@120Hz RB
> 88.75 MHz 	- 1440x900@60Hz RB
> 115.5 MHz 	- 1024x768@120Hz RB
> 119 MHz 	- 1680x1050@60Hz RB
>
> Signed-off-by: Shirish S <s.shirish@samsung.com>
> ---
> V2: Incorporated review comments
>
>   drivers/gpu/drm/exynos/exynos_hdmi.c |   45 ++++++++++++++++++++++++++++++++++
>   1 file changed, 45 insertions(+)

Reviewed-by: Tomasz Figa <t.figa@samsung.com>

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

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

* Re: [PATCH] drm/exynos: set the active aspect ratio as per mode
  2014-03-13  5:28 ` [PATCH] drm/exynos: set the active aspect ratio as per mode Shirish S
@ 2014-03-18 13:04   ` Tomasz Figa
  2014-03-19  8:25     ` Inki Dae
  0 siblings, 1 reply; 13+ messages in thread
From: Tomasz Figa @ 2014-03-18 13:04 UTC (permalink / raw)
  To: Shirish S, dri-devel, inki.dae; +Cc: shirish

Hi Shirish,

On 13.03.2014 06:28, Shirish S wrote:
> Now that the drm_display_mode also provides aspect
> ratio for all resolutions, this patch adds its usage
> to set the active aspect ratio of AVI info frame
> packets as per CEA-861-D standard's Table 9.
>
> This is also needed to abide by the 7-27
> compliance test of HDMI.
>
> Signed-off-by: Shirish S <s.shirish@samsung.com>
> ---
> V2: rebased on new branch
> V3: Incorporated review comments
>
>   drivers/gpu/drm/exynos/exynos_hdmi.c |   35 +++++++++++++++++++++++++++-------
>   1 file changed, 28 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 12fdf55..9b0b617 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -53,12 +53,13 @@
>   /* AVI header and aspect ratio */
>   #define HDMI_AVI_VERSION		0x02
>   #define HDMI_AVI_LENGTH		0x0D
> -#define AVI_PIC_ASPECT_RATIO_16_9	(2 << 4)
> -#define AVI_SAME_AS_PIC_ASPECT_RATIO	8
>
>   /* AUI header info */
>   #define HDMI_AUI_VERSION	0x01
>   #define HDMI_AUI_LENGTH	0x0A
> +#define	AVI_SAME_AS_PIC_ASPECT_RATIO 0x8
> +#define	AVI_4_3_CENTER_RATIO	0x9
> +#define	AVI_16_9_CENTER_RATIO	0xa

One minor nitpick: Please don't use tabs between #define and macro name.

After fixing this issue feel free to add my:

Reviewed-by: Tomasz Figa <t.figa@samsung.com>

Best regards,
Tomasz

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

* Re: [PATCH] drm/exynos: set the active aspect ratio as per mode
  2014-03-18 13:04   ` Tomasz Figa
@ 2014-03-19  8:25     ` Inki Dae
  0 siblings, 0 replies; 13+ messages in thread
From: Inki Dae @ 2014-03-19  8:25 UTC (permalink / raw)
  To: Tomasz Figa; +Cc: Shirish S, Shirish S, DRI mailing list

2014-03-18 22:04 GMT+09:00 Tomasz Figa <t.figa@samsung.com>:
> Hi Shirish,
>
>
> On 13.03.2014 06:28, Shirish S wrote:
>>
>> Now that the drm_display_mode also provides aspect
>> ratio for all resolutions, this patch adds its usage
>> to set the active aspect ratio of AVI info frame
>> packets as per CEA-861-D standard's Table 9.
>>
>> This is also needed to abide by the 7-27
>> compliance test of HDMI.
>>
>> Signed-off-by: Shirish S <s.shirish@samsung.com>
>> ---
>> V2: rebased on new branch
>> V3: Incorporated review comments
>>
>>   drivers/gpu/drm/exynos/exynos_hdmi.c |   35
>> +++++++++++++++++++++++++++-------
>>   1 file changed, 28 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 12fdf55..9b0b617 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -53,12 +53,13 @@
>>   /* AVI header and aspect ratio */
>>   #define HDMI_AVI_VERSION              0x02
>>   #define HDMI_AVI_LENGTH               0x0D
>> -#define AVI_PIC_ASPECT_RATIO_16_9      (2 << 4)
>> -#define AVI_SAME_AS_PIC_ASPECT_RATIO   8
>>
>>   /* AUI header info */
>>   #define HDMI_AUI_VERSION      0x01
>>   #define HDMI_AUI_LENGTH       0x0A
>> +#define        AVI_SAME_AS_PIC_ASPECT_RATIO 0x8
>> +#define        AVI_4_3_CENTER_RATIO    0x9
>> +#define        AVI_16_9_CENTER_RATIO   0xa
>
>
> One minor nitpick: Please don't use tabs between #define and macro name.
>

Fixed and applied.

Thanks,
Inki Dae

> After fixing this issue feel free to add my:
>
> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>
> Best regards,
> Tomasz
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/exynos: add phy settings for RB resolutions
  2014-03-13  5:28 [PATCH] drm/exynos: add phy settings for RB resolutions Shirish S
  2014-03-13  5:28 ` [PATCH] drm/exynos: set the active aspect ratio as per mode Shirish S
  2014-03-18 13:01 ` [PATCH] drm/exynos: add phy settings for RB resolutions Tomasz Figa
@ 2014-03-19  8:25 ` Inki Dae
  2014-03-20  7:35 ` Stéphane Marchesin
  3 siblings, 0 replies; 13+ messages in thread
From: Inki Dae @ 2014-03-19  8:25 UTC (permalink / raw)
  To: Shirish S; +Cc: Shirish S, DRI mailing list

Applied.

Thanks,
Inki Dae

2014-03-13 14:28 GMT+09:00 Shirish S <s.shirish@samsung.com>:
> This patch adds support for the below mentioned
> pixel clocks in Exynos5250.
> Without them, following display modes won't
> be supported:
>
> 71 MHz  - 1280x800@60Hz RB
> 73.25 MHz       - 800x600@120Hz RB
> 88.75 MHz       - 1440x900@60Hz RB
> 115.5 MHz       - 1024x768@120Hz RB
> 119 MHz         - 1680x1050@60Hz RB
>
> Signed-off-by: Shirish S <s.shirish@samsung.com>
> ---
> V2: Incorporated review comments
>
>  drivers/gpu/drm/exynos/exynos_hdmi.c |   45 ++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 12fdf55..406d89d 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -304,6 +304,24 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = {
>                 },
>         },
>         {
> +               .pixel_clock = 71000000,
> +               .conf = {
> +                       0x01, 0x91, 0x1e, 0x15, 0x40, 0x3c, 0xce, 0x08,
> +                       0x04, 0x20, 0xb2, 0xd8, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0xad, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
> +               .pixel_clock = 73250000,
> +               .conf = {
> +                       0x01, 0xd1, 0x1f, 0x15, 0x40, 0x18, 0xe9, 0x08,
> +                       0x02, 0xa0, 0xb7, 0xd8, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0xa8, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
>                 .pixel_clock = 74176000,
>                 .conf = {
>                         0x01, 0xd1, 0x3e, 0x35, 0x40, 0x5b, 0xde, 0x08,
> @@ -331,6 +349,15 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = {
>                 },
>         },
>         {
> +               .pixel_clock = 88750000,
> +               .conf = {
> +                       0x01, 0x91, 0x25, 0x17, 0x40, 0x30, 0xfe, 0x08,
> +                       0x06, 0x20, 0xde, 0xd8, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0x8a, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
>                 .pixel_clock = 106500000,
>                 .conf = {
>                         0x01, 0xd1, 0x2c, 0x12, 0x40, 0x0c, 0x09, 0x08,
> @@ -349,6 +376,24 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = {
>                 },
>         },
>         {
> +               .pixel_clock = 115500000,
> +               .conf = {
> +                       0x01, 0xd1, 0x30, 0x1a, 0x40, 0x40, 0x10, 0x04,
> +                       0x04, 0xa0, 0x21, 0xd9, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0xaa, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
> +               .pixel_clock = 119000000,
> +               .conf = {
> +                       0x01, 0x91, 0x32, 0x14, 0x40, 0x60, 0xd8, 0x08,
> +                       0x06, 0x20, 0x2a, 0xd9, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0x9d, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
>                 .pixel_clock = 146250000,
>                 .conf = {
>                         0x01, 0xd1, 0x3d, 0x15, 0x40, 0x18, 0xfd, 0x08,
> --
> 1.7.10.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/exynos: add phy settings for RB resolutions
  2014-03-13  5:28 [PATCH] drm/exynos: add phy settings for RB resolutions Shirish S
                   ` (2 preceding siblings ...)
  2014-03-19  8:25 ` Inki Dae
@ 2014-03-20  7:35 ` Stéphane Marchesin
  2014-04-02  4:09   ` Shirish S
  3 siblings, 1 reply; 13+ messages in thread
From: Stéphane Marchesin @ 2014-03-20  7:35 UTC (permalink / raw)
  To: Shirish S; +Cc: shirish, dri-devel@lists.freedesktop.org


[-- Attachment #1.1: Type: text/plain, Size: 4198 bytes --]

On Wed, Mar 12, 2014 at 10:28 PM, Shirish S <s.shirish@samsung.com> wrote:

> This patch adds support for the below mentioned
> pixel clocks in Exynos5250.
> Without them, following display modes won't
> be supported:
>
> 71 MHz  - 1280x800@60Hz RB
> 73.25 MHz       - 800x600@120Hz RB
> 88.75 MHz       - 1440x900@60Hz RB
> 115.5 MHz       - 1024x768@120Hz RB
> 119 MHz         - 1680x1050@60Hz RB
>
> Signed-off-by: Shirish S <s.shirish@samsung.com>
> ---
> V2: Incorporated review comments
>
>  drivers/gpu/drm/exynos/exynos_hdmi.c |   45
> ++++++++++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
> b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 12fdf55..406d89d 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -304,6 +304,24 @@ static const struct hdmiphy_config
> hdmiphy_v14_configs[] = {
>                 },
>         },
>         {
> +               .pixel_clock = 71000000,
> +               .conf = {
> +                       0x01, 0x91, 0x1e, 0x15, 0x40, 0x3c, 0xce, 0x08,
> +                       0x04, 0x20, 0xb2, 0xd8, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0xad, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
> +               .pixel_clock = 73250000,
> +               .conf = {
> +                       0x01, 0xd1, 0x1f, 0x15, 0x40, 0x18, 0xe9, 0x08,
> +                       0x02, 0xa0, 0xb7, 0xd8, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0xa8, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
>                 .pixel_clock = 74176000,
>                 .conf = {
>                         0x01, 0xd1, 0x3e, 0x35, 0x40, 0x5b, 0xde, 0x08,
> @@ -331,6 +349,15 @@ static const struct hdmiphy_config
> hdmiphy_v14_configs[] = {
>                 },
>         },
>         {
> +               .pixel_clock = 88750000,
> +               .conf = {
> +                       0x01, 0x91, 0x25, 0x17, 0x40, 0x30, 0xfe, 0x08,
> +                       0x06, 0x20, 0xde, 0xd8, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0x8a, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
>                 .pixel_clock = 106500000,
>                 .conf = {
>                         0x01, 0xd1, 0x2c, 0x12, 0x40, 0x0c, 0x09, 0x08,
> @@ -349,6 +376,24 @@ static const struct hdmiphy_config
> hdmiphy_v14_configs[] = {
>                 },
>         },
>         {
> +               .pixel_clock = 115500000,
> +               .conf = {
> +                       0x01, 0xd1, 0x30, 0x1a, 0x40, 0x40, 0x10, 0x04,
> +                       0x04, 0xa0, 0x21, 0xd9, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0xaa, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
> +               .pixel_clock = 119000000,
>


We have found that the 119MHz clock doesn't work in Chrome OS (the clock
doesn't stabilize), so we removed it. We should probably remove it here as
well.

Stéphane

+               .conf = {
> +                       0x01, 0x91, 0x32, 0x14, 0x40, 0x60, 0xd8, 0x08,
> +                       0x06, 0x20, 0x2a, 0xd9, 0x45, 0xa0, 0xac, 0x80,
> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
> +                       0x54, 0x9d, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
> +               },
> +       },
> +       {
>                 .pixel_clock = 146250000,
>                 .conf = {
>                         0x01, 0xd1, 0x3d, 0x15, 0x40, 0x18, 0xfd, 0x08,
> --
> 1.7.10.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

[-- Attachment #1.2: Type: text/html, Size: 7648 bytes --]

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

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

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

* Re: [PATCH] drm/exynos: add phy settings for RB resolutions
  2014-03-20  7:35 ` Stéphane Marchesin
@ 2014-04-02  4:09   ` Shirish S
  2014-05-05  5:00     ` Shirish S
  0 siblings, 1 reply; 13+ messages in thread
From: Shirish S @ 2014-04-02  4:09 UTC (permalink / raw)
  To: Stéphane Marchesin; +Cc: Shirish S, dri-devel@lists.freedesktop.org

Hi,
Kindly hold the merging of this patch, i shall
update it with proper values, once i receive it from our hardware team.
Regards,
ShirisH S
On Thu, Mar 20, 2014 at 1:05 PM, Stéphane Marchesin
<stephane.marchesin@gmail.com> wrote:
>
>
>
> On Wed, Mar 12, 2014 at 10:28 PM, Shirish S <s.shirish@samsung.com> wrote:
>>
>> This patch adds support for the below mentioned
>> pixel clocks in Exynos5250.
>> Without them, following display modes won't
>> be supported:
>>
>> 71 MHz  - 1280x800@60Hz RB
>> 73.25 MHz       - 800x600@120Hz RB
>> 88.75 MHz       - 1440x900@60Hz RB
>> 115.5 MHz       - 1024x768@120Hz RB
>> 119 MHz         - 1680x1050@60Hz RB
>>
>> Signed-off-by: Shirish S <s.shirish@samsung.com>
>> ---
>> V2: Incorporated review comments
>>
>>  drivers/gpu/drm/exynos/exynos_hdmi.c |   45
>> ++++++++++++++++++++++++++++++++++
>>  1 file changed, 45 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 12fdf55..406d89d 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -304,6 +304,24 @@ static const struct hdmiphy_config
>> hdmiphy_v14_configs[] = {
>>                 },
>>         },
>>         {
>> +               .pixel_clock = 71000000,
>> +               .conf = {
>> +                       0x01, 0x91, 0x1e, 0x15, 0x40, 0x3c, 0xce, 0x08,
>> +                       0x04, 0x20, 0xb2, 0xd8, 0x45, 0xa0, 0xac, 0x80,
>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>> +                       0x54, 0xad, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
>> +               },
>> +       },
>> +       {
>> +               .pixel_clock = 73250000,
>> +               .conf = {
>> +                       0x01, 0xd1, 0x1f, 0x15, 0x40, 0x18, 0xe9, 0x08,
>> +                       0x02, 0xa0, 0xb7, 0xd8, 0x45, 0xa0, 0xac, 0x80,
>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>> +                       0x54, 0xa8, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
>> +               },
>> +       },
>> +       {
>>                 .pixel_clock = 74176000,
>>                 .conf = {
>>                         0x01, 0xd1, 0x3e, 0x35, 0x40, 0x5b, 0xde, 0x08,
>> @@ -331,6 +349,15 @@ static const struct hdmiphy_config
>> hdmiphy_v14_configs[] = {
>>                 },
>>         },
>>         {
>> +               .pixel_clock = 88750000,
>> +               .conf = {
>> +                       0x01, 0x91, 0x25, 0x17, 0x40, 0x30, 0xfe, 0x08,
>> +                       0x06, 0x20, 0xde, 0xd8, 0x45, 0xa0, 0xac, 0x80,
>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>> +                       0x54, 0x8a, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
>> +               },
>> +       },
>> +       {
>>                 .pixel_clock = 106500000,
>>                 .conf = {
>>                         0x01, 0xd1, 0x2c, 0x12, 0x40, 0x0c, 0x09, 0x08,
>> @@ -349,6 +376,24 @@ static const struct hdmiphy_config
>> hdmiphy_v14_configs[] = {
>>                 },
>>         },
>>         {
>> +               .pixel_clock = 115500000,
>> +               .conf = {
>> +                       0x01, 0xd1, 0x30, 0x1a, 0x40, 0x40, 0x10, 0x04,
>> +                       0x04, 0xa0, 0x21, 0xd9, 0x45, 0xa0, 0xac, 0x80,
>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>> +                       0x54, 0xaa, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
>> +               },
>> +       },
>> +       {
>> +               .pixel_clock = 119000000,
>
>
>
> We have found that the 119MHz clock doesn't work in Chrome OS (the clock
> doesn't stabilize), so we removed it. We should probably remove it here as
> well.
>
> Stéphane
>
I have informed this issue to the hardware team, and will update it
once i receive
any changes,
Also i
>> +               .conf = {
>> +                       0x01, 0x91, 0x32, 0x14, 0x40, 0x60, 0xd8, 0x08,
>> +                       0x06, 0x20, 0x2a, 0xd9, 0x45, 0xa0, 0xac, 0x80,
>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>> +                       0x54, 0x9d, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
>> +               },
>> +       },
>> +       {
>>                 .pixel_clock = 146250000,
>>                 .conf = {
>>                         0x01, 0xd1, 0x3d, 0x15, 0x40, 0x18, 0xfd, 0x08,
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>

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

* Re: [PATCH] drm/exynos: add phy settings for RB resolutions
  2014-04-02  4:09   ` Shirish S
@ 2014-05-05  5:00     ` Shirish S
  0 siblings, 0 replies; 13+ messages in thread
From: Shirish S @ 2014-05-05  5:00 UTC (permalink / raw)
  To: Stéphane Marchesin; +Cc: Shirish S, dri-devel@lists.freedesktop.org

Hi,
Have posted a patch that updates the phy settings provided by our hardware team.
For now support for 88.75 MHz is removed, will update it as and when i
recieve and settings
for that pixel clock.
Regards,
Shirish S

On Wed, Apr 2, 2014 at 9:39 AM, Shirish S <shirish@chromium.org> wrote:
> Hi,
> Kindly hold the merging of this patch, i shall
> update it with proper values, once i receive it from our hardware team.
> Regards,
> ShirisH S
> On Thu, Mar 20, 2014 at 1:05 PM, Stéphane Marchesin
> <stephane.marchesin@gmail.com> wrote:
>>
>>
>>
>> On Wed, Mar 12, 2014 at 10:28 PM, Shirish S <s.shirish@samsung.com> wrote:
>>>
>>> This patch adds support for the below mentioned
>>> pixel clocks in Exynos5250.
>>> Without them, following display modes won't
>>> be supported:
>>>
>>> 71 MHz  - 1280x800@60Hz RB
>>> 73.25 MHz       - 800x600@120Hz RB
>>> 88.75 MHz       - 1440x900@60Hz RB
>>> 115.5 MHz       - 1024x768@120Hz RB
>>> 119 MHz         - 1680x1050@60Hz RB
>>>
>>> Signed-off-by: Shirish S <s.shirish@samsung.com>
>>> ---
>>> V2: Incorporated review comments
>>>
>>>  drivers/gpu/drm/exynos/exynos_hdmi.c |   45
>>> ++++++++++++++++++++++++++++++++++
>>>  1 file changed, 45 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> b/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> index 12fdf55..406d89d 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> @@ -304,6 +304,24 @@ static const struct hdmiphy_config
>>> hdmiphy_v14_configs[] = {
>>>                 },
>>>         },
>>>         {
>>> +               .pixel_clock = 71000000,
>>> +               .conf = {
>>> +                       0x01, 0x91, 0x1e, 0x15, 0x40, 0x3c, 0xce, 0x08,
>>> +                       0x04, 0x20, 0xb2, 0xd8, 0x45, 0xa0, 0xac, 0x80,
>>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>>> +                       0x54, 0xad, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
>>> +               },
>>> +       },
>>> +       {
>>> +               .pixel_clock = 73250000,
>>> +               .conf = {
>>> +                       0x01, 0xd1, 0x1f, 0x15, 0x40, 0x18, 0xe9, 0x08,
>>> +                       0x02, 0xa0, 0xb7, 0xd8, 0x45, 0xa0, 0xac, 0x80,
>>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>>> +                       0x54, 0xa8, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
>>> +               },
>>> +       },
>>> +       {
>>>                 .pixel_clock = 74176000,
>>>                 .conf = {
>>>                         0x01, 0xd1, 0x3e, 0x35, 0x40, 0x5b, 0xde, 0x08,
>>> @@ -331,6 +349,15 @@ static const struct hdmiphy_config
>>> hdmiphy_v14_configs[] = {
>>>                 },
>>>         },
>>>         {
>>> +               .pixel_clock = 88750000,
>>> +               .conf = {
>>> +                       0x01, 0x91, 0x25, 0x17, 0x40, 0x30, 0xfe, 0x08,
>>> +                       0x06, 0x20, 0xde, 0xd8, 0x45, 0xa0, 0xac, 0x80,
>>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>>> +                       0x54, 0x8a, 0x24, 0x01, 0x00, 0x00, 0x01, 0x80,
>>> +               },
>>> +       },
>>> +       {
>>>                 .pixel_clock = 106500000,
>>>                 .conf = {
>>>                         0x01, 0xd1, 0x2c, 0x12, 0x40, 0x0c, 0x09, 0x08,
>>> @@ -349,6 +376,24 @@ static const struct hdmiphy_config
>>> hdmiphy_v14_configs[] = {
>>>                 },
>>>         },
>>>         {
>>> +               .pixel_clock = 115500000,
>>> +               .conf = {
>>> +                       0x01, 0xd1, 0x30, 0x1a, 0x40, 0x40, 0x10, 0x04,
>>> +                       0x04, 0xa0, 0x21, 0xd9, 0x45, 0xa0, 0xac, 0x80,
>>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>>> +                       0x54, 0xaa, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
>>> +               },
>>> +       },
>>> +       {
>>> +               .pixel_clock = 119000000,
>>
>>
>>
>> We have found that the 119MHz clock doesn't work in Chrome OS (the clock
>> doesn't stabilize), so we removed it. We should probably remove it here as
>> well.
>>
>> Stéphane
>>
> I have informed this issue to the hardware team, and will update it
> once i receive
> any changes,
> Also i
>>> +               .conf = {
>>> +                       0x01, 0x91, 0x32, 0x14, 0x40, 0x60, 0xd8, 0x08,
>>> +                       0x06, 0x20, 0x2a, 0xd9, 0x45, 0xa0, 0xac, 0x80,
>>> +                       0x06, 0x80, 0x11, 0x04, 0x02, 0x22, 0x44, 0x86,
>>> +                       0x54, 0x9d, 0x25, 0x03, 0x00, 0x00, 0x01, 0x80,
>>> +               },
>>> +       },
>>> +       {
>>>                 .pixel_clock = 146250000,
>>>                 .conf = {
>>>                         0x01, 0xd1, 0x3d, 0x15, 0x40, 0x18, 0xfd, 0x08,
>>> --
>>> 1.7.10.4
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2014-05-05  5:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13  5:28 [PATCH] drm/exynos: add phy settings for RB resolutions Shirish S
2014-03-13  5:28 ` [PATCH] drm/exynos: set the active aspect ratio as per mode Shirish S
2014-03-18 13:04   ` Tomasz Figa
2014-03-19  8:25     ` Inki Dae
2014-03-18 13:01 ` [PATCH] drm/exynos: add phy settings for RB resolutions Tomasz Figa
2014-03-19  8:25 ` Inki Dae
2014-03-20  7:35 ` Stéphane Marchesin
2014-04-02  4:09   ` Shirish S
2014-05-05  5:00     ` Shirish S
  -- strict thread matches above, loose matches on Subject: below --
2014-03-11  9:00 [PATCH] drm/exynos: set the active aspect ratio as per mode Shirish S
2014-03-10  3:44 Shirish S
2014-03-12 15:19 ` Tomasz Figa
2014-03-13  3:15   ` Shirish S

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.