[PATCH v3] drm: exynos: hdmi: sending AVI and AUI info frames
Please, comply with patch format next time. Applied. Thank, Inki Dae > -Original Message- > From: Rahul Sharma [mailto:rahul.sharma at samsung.com] > Sent: Monday, November 26, 2012 2:23 PM > To: dri-devel at lists.freedesktop.org > Cc: inki.dae at samsung.com; kgene.kim at samsung.com; r.sh.open at gmail.com; > sw0312.kim at samsung.com; joshi at samsung.com > Subject: [PATCH v3] drm: exynos: hdmi: sending AVI and AUI info frames > Modified it like below, drm/exynos: sending AVI and AUI info frames. > This patch adds code for composing AVI and AUI info frames > and send them every VSYNC. > > This patch is important for hdmi certification. > > v1: > - Remove un-necessary blank lines. > - Change the case of hex constants. > > v2: > - Added few blank lines. > - Corrected comments format. > - Added comments for 2's Complement calculation for check sum. > > v3: > - Moved enums, macros to exynos_hdmi.c. > - Corrected hex format. > - Added static to hdmi_reg_infoframe. > And like below, v3: ... v2: ... v1 ... > Signed-off-by: Rahul Sharma > Signed-off-by: Fahad Kunnathadi > Signed-off-by: Shirish S > > --- > Based on exynos-drm-next branch of > http://git.kernel.org/?p=linux/kernel/git/daeinki/drm-exynos.git > > drivers/gpu/drm/exynos/exynos_hdmi.c | 165 > ++ > drivers/gpu/drm/exynos/regs-hdmi.h | 17 +++- > 2 files changed, 161 insertions(+), 21 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c > b/drivers/gpu/drm/exynos/exynos_hdmi.c > index 59839cc..1145be4 100644 > --- a/drivers/gpu/drm/exynos/exynos_hdmi.c > +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c > @@ -51,6 +51,29 @@ > #define MAX_HEIGHT 1080 > #define get_hdmi_context(dev) > platform_get_drvdata(to_platform_device(dev)) > > +/* 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 > + > +/* HDMI infoframe to configure HDMI out packet header, AUI and AVI */ > +enum HDMI_PACKET_TYPE { > + /* refer to Table 5-8 Packet Type in HDMI specification v1.4a */ > + /* InfoFrame packet type */ > + HDMI_PACKET_TYPE_INFOFRAME = 0x80, > + /* Vendor-Specific InfoFrame */ > + HDMI_PACKET_TYPE_VSI = HDMI_PACKET_TYPE_INFOFRAME + 1, > + /* Auxiliary Video information InfoFrame */ > + HDMI_PACKET_TYPE_AVI = HDMI_PACKET_TYPE_INFOFRAME + 2, > + /* Audio information InfoFrame */ > + HDMI_PACKET_TYPE_AUI = HDMI_PACKET_TYPE_INFOFRAME + 4 > +}; > + > enum hdmi_type { > HDMI_TYPE13, > HDMI_TYPE14, > @@ -183,6 +206,7 @@ struct hdmi_v13_conf { > int height; > int vrefresh; > bool interlace; > + int cea_video_id; > const u8 *hdmiphy_data; > const struct hdmi_v13_preset_conf *conf; > }; > @@ -354,15 +378,20 @@ static const struct hdmi_v13_preset_conf > hdmi_v13_conf_1080p60 = { > }; > > static const struct hdmi_v13_conf hdmi_v13_confs[] = { > - { 1280, 720, 60, false, hdmiphy_v13_conf74_25, > _v13_conf_720p60 }, > - { 1280, 720, 50, false, hdmiphy_v13_conf74_25, > _v13_conf_720p60 }, > - { 720, 480, 60, false, hdmiphy_v13_conf27_027, > _v13_conf_480p }, > - { 1920, 1080, 50, true, hdmiphy_v13_conf74_25, > _v13_conf_1080i50 }, > - { 1920, 1080, 50, false, hdmiphy_v13_conf148_5, > - _v13_conf_1080p50 }, > - { 1920, 1080, 60, true, hdmiphy_v13_conf74_25, > _v13_conf_1080i60 }, > - { 1920, 1080, 60, false, hdmiphy_v13_conf148_5, > - _v13_conf_1080p60 }, > + { 1280, 720, 60, false, 4, hdmiphy_v13_conf74_25, > + _v13_conf_720p60 }, > + { 1280, 720, 50, false, 19, hdmiphy_v13_conf74_25, > + _v13_conf_720p60 }, > + { 720, 480, 60, false, 3, hdmiphy_v13_conf27_027, > + _v13_conf_480p }, > + { 1920, 1080, 50, true, 20, hdmiphy_v13_conf74_25, > + _v13_conf_1080i50 }, > + { 1920, 1080, 50, false, 31, hdmiphy_v13_conf148_5, > + _v13_conf_1080p50 }, > + { 1920, 1080, 60, true, 5, hdmiphy_v13_conf74_25, > + _v13_conf_1080i60 }, > + { 1920, 1080, 60, false, 16, hdmiphy_v13_conf148_5, > + _v13_conf_1080p60 }, > }; > > /* HDMI Version 1.4 */ > @@ -480,6 +509,7 @@ struct hdmi_conf { > int height; > int vrefresh;
[PATCH v3] drm: exynos: hdmi: sending AVI and AUI info frames
This patch adds code for composing AVI and AUI info frames and send them every VSYNC. This patch is important for hdmi certification. v1: - Remove un-necessary blank lines. - Change the case of hex constants. v2: - Added few blank lines. - Corrected comments format. - Added comments for 2's Complement calculation for check sum. v3: - Moved enums, macros to exynos_hdmi.c. - Corrected hex format. - Added static to hdmi_reg_infoframe. Signed-off-by: Rahul Sharma Signed-off-by: Fahad Kunnathadi Signed-off-by: Shirish S --- Based on exynos-drm-next branch of http://git.kernel.org/?p=linux/kernel/git/daeinki/drm-exynos.git drivers/gpu/drm/exynos/exynos_hdmi.c | 165 ++ drivers/gpu/drm/exynos/regs-hdmi.h | 17 +++- 2 files changed, 161 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 59839cc..1145be4 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -51,6 +51,29 @@ #define MAX_HEIGHT 1080 #define get_hdmi_context(dev) platform_get_drvdata(to_platform_device(dev)) +/* AVI header and aspect ratio */ +#define HDMI_AVI_VERSION 0x02 +#define HDMI_AVI_LENGTH0x0D +#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_LENGTH0x0A + +/* HDMI infoframe to configure HDMI out packet header, AUI and AVI */ +enum HDMI_PACKET_TYPE { + /* refer to Table 5-8 Packet Type in HDMI specification v1.4a */ + /* InfoFrame packet type */ + HDMI_PACKET_TYPE_INFOFRAME = 0x80, + /* Vendor-Specific InfoFrame */ + HDMI_PACKET_TYPE_VSI = HDMI_PACKET_TYPE_INFOFRAME + 1, + /* Auxiliary Video information InfoFrame */ + HDMI_PACKET_TYPE_AVI = HDMI_PACKET_TYPE_INFOFRAME + 2, + /* Audio information InfoFrame */ + HDMI_PACKET_TYPE_AUI = HDMI_PACKET_TYPE_INFOFRAME + 4 +}; + enum hdmi_type { HDMI_TYPE13, HDMI_TYPE14, @@ -183,6 +206,7 @@ struct hdmi_v13_conf { int height; int vrefresh; bool interlace; + int cea_video_id; const u8 *hdmiphy_data; const struct hdmi_v13_preset_conf *conf; }; @@ -354,15 +378,20 @@ static const struct hdmi_v13_preset_conf hdmi_v13_conf_1080p60 = { }; static const struct hdmi_v13_conf hdmi_v13_confs[] = { - { 1280, 720, 60, false, hdmiphy_v13_conf74_25, _v13_conf_720p60 }, - { 1280, 720, 50, false, hdmiphy_v13_conf74_25, _v13_conf_720p60 }, - { 720, 480, 60, false, hdmiphy_v13_conf27_027, _v13_conf_480p }, - { 1920, 1080, 50, true, hdmiphy_v13_conf74_25, _v13_conf_1080i50 }, - { 1920, 1080, 50, false, hdmiphy_v13_conf148_5, -_v13_conf_1080p50 }, - { 1920, 1080, 60, true, hdmiphy_v13_conf74_25, _v13_conf_1080i60 }, - { 1920, 1080, 60, false, hdmiphy_v13_conf148_5, -_v13_conf_1080p60 }, + { 1280, 720, 60, false, 4, hdmiphy_v13_conf74_25, + _v13_conf_720p60 }, + { 1280, 720, 50, false, 19, hdmiphy_v13_conf74_25, + _v13_conf_720p60 }, + { 720, 480, 60, false, 3, hdmiphy_v13_conf27_027, + _v13_conf_480p }, + { 1920, 1080, 50, true, 20, hdmiphy_v13_conf74_25, + _v13_conf_1080i50 }, + { 1920, 1080, 50, false, 31, hdmiphy_v13_conf148_5, + _v13_conf_1080p50 }, + { 1920, 1080, 60, true, 5, hdmiphy_v13_conf74_25, + _v13_conf_1080i60 }, + { 1920, 1080, 60, false, 16, hdmiphy_v13_conf148_5, + _v13_conf_1080p60 }, }; /* HDMI Version 1.4 */ @@ -480,6 +509,7 @@ struct hdmi_conf { int height; int vrefresh; bool interlace; + int cea_video_id; const u8 *hdmiphy_data; const struct hdmi_preset_conf *conf; }; @@ -935,16 +965,21 @@ static const struct hdmi_preset_conf hdmi_conf_1080p60 = { }; static const struct hdmi_conf hdmi_confs[] = { - { 720, 480, 60, false, hdmiphy_conf27_027, _conf_480p60 }, - { 1280, 720, 50, false, hdmiphy_conf74_25, _conf_720p50 }, - { 1280, 720, 60, false, hdmiphy_conf74_25, _conf_720p60 }, - { 1920, 1080, 50, true, hdmiphy_conf74_25, _conf_1080i50 }, - { 1920, 1080, 60, true, hdmiphy_conf74_25, _conf_1080i60 }, - { 1920, 1080, 30, false, hdmiphy_conf74_176, _conf_1080p30 }, - { 1920, 1080, 50, false, hdmiphy_conf148_5, _conf_1080p50 }, - { 1920, 1080, 60, false, hdmiphy_conf148_5, _conf_1080p60 }, + { 720, 480, 60, false, 3, hdmiphy_conf27_027, _conf_480p60 }, + { 1280, 720, 50, false, 19, hdmiphy_conf74_25, _conf_720p50 }, + { 1280, 720, 60, false, 4, hdmiphy_conf74_25, _conf_720p60 }, + { 1920, 1080, 50, true, 20, hdmiphy_conf74_25,
RE: [PATCH v3] drm: exynos: hdmi: sending AVI and AUI info frames
Please, comply with patch format next time. Applied. Thank, Inki Dae -Original Message- From: Rahul Sharma [mailto:rahul.sha...@samsung.com] Sent: Monday, November 26, 2012 2:23 PM To: dri-devel@lists.freedesktop.org Cc: inki@samsung.com; kgene@samsung.com; r.sh.o...@gmail.com; sw0312@samsung.com; jo...@samsung.com Subject: [PATCH v3] drm: exynos: hdmi: sending AVI and AUI info frames Modified it like below, drm/exynos: sending AVI and AUI info frames. This patch adds code for composing AVI and AUI info frames and send them every VSYNC. This patch is important for hdmi certification. v1: - Remove un-necessary blank lines. - Change the case of hex constants. v2: - Added few blank lines. - Corrected comments format. - Added comments for 2's Complement calculation for check sum. v3: - Moved enums, macros to exynos_hdmi.c. - Corrected hex format. - Added static to hdmi_reg_infoframe. And like below, v3: ... v2: ... v1 ... Signed-off-by: Rahul Sharma rahul.sha...@samsung.com Signed-off-by: Fahad Kunnathadi faha...@samsung.com Signed-off-by: Shirish S s.shir...@samsung.com --- Based on exynos-drm-next branch of http://git.kernel.org/?p=linux/kernel/git/daeinki/drm-exynos.git drivers/gpu/drm/exynos/exynos_hdmi.c | 165 ++ drivers/gpu/drm/exynos/regs-hdmi.h | 17 +++- 2 files changed, 161 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 59839cc..1145be4 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -51,6 +51,29 @@ #define MAX_HEIGHT 1080 #define get_hdmi_context(dev) platform_get_drvdata(to_platform_device(dev)) +/* 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 + +/* HDMI infoframe to configure HDMI out packet header, AUI and AVI */ +enum HDMI_PACKET_TYPE { + /* refer to Table 5-8 Packet Type in HDMI specification v1.4a */ + /* InfoFrame packet type */ + HDMI_PACKET_TYPE_INFOFRAME = 0x80, + /* Vendor-Specific InfoFrame */ + HDMI_PACKET_TYPE_VSI = HDMI_PACKET_TYPE_INFOFRAME + 1, + /* Auxiliary Video information InfoFrame */ + HDMI_PACKET_TYPE_AVI = HDMI_PACKET_TYPE_INFOFRAME + 2, + /* Audio information InfoFrame */ + HDMI_PACKET_TYPE_AUI = HDMI_PACKET_TYPE_INFOFRAME + 4 +}; + enum hdmi_type { HDMI_TYPE13, HDMI_TYPE14, @@ -183,6 +206,7 @@ struct hdmi_v13_conf { int height; int vrefresh; bool interlace; + int cea_video_id; const u8 *hdmiphy_data; const struct hdmi_v13_preset_conf *conf; }; @@ -354,15 +378,20 @@ static const struct hdmi_v13_preset_conf hdmi_v13_conf_1080p60 = { }; static const struct hdmi_v13_conf hdmi_v13_confs[] = { - { 1280, 720, 60, false, hdmiphy_v13_conf74_25, hdmi_v13_conf_720p60 }, - { 1280, 720, 50, false, hdmiphy_v13_conf74_25, hdmi_v13_conf_720p60 }, - { 720, 480, 60, false, hdmiphy_v13_conf27_027, hdmi_v13_conf_480p }, - { 1920, 1080, 50, true, hdmiphy_v13_conf74_25, hdmi_v13_conf_1080i50 }, - { 1920, 1080, 50, false, hdmiphy_v13_conf148_5, - hdmi_v13_conf_1080p50 }, - { 1920, 1080, 60, true, hdmiphy_v13_conf74_25, hdmi_v13_conf_1080i60 }, - { 1920, 1080, 60, false, hdmiphy_v13_conf148_5, - hdmi_v13_conf_1080p60 }, + { 1280, 720, 60, false, 4, hdmiphy_v13_conf74_25, + hdmi_v13_conf_720p60 }, + { 1280, 720, 50, false, 19, hdmiphy_v13_conf74_25, + hdmi_v13_conf_720p60 }, + { 720, 480, 60, false, 3, hdmiphy_v13_conf27_027, + hdmi_v13_conf_480p }, + { 1920, 1080, 50, true, 20, hdmiphy_v13_conf74_25, + hdmi_v13_conf_1080i50 }, + { 1920, 1080, 50, false, 31, hdmiphy_v13_conf148_5, + hdmi_v13_conf_1080p50 }, + { 1920, 1080, 60, true, 5, hdmiphy_v13_conf74_25, + hdmi_v13_conf_1080i60 }, + { 1920, 1080, 60, false, 16, hdmiphy_v13_conf148_5, + hdmi_v13_conf_1080p60 }, }; /* HDMI Version 1.4 */ @@ -480,6 +509,7 @@ struct hdmi_conf { int height; int vrefresh; bool interlace; + int cea_video_id; const u8 *hdmiphy_data; const struct hdmi_preset_conf *conf; }; @@ -935,16 +965,21 @@ static const struct hdmi_preset_conf hdmi_conf_1080p60 = { }; static const struct hdmi_conf hdmi_confs[] = { - { 720, 480, 60, false, hdmiphy_conf27_027, hdmi_conf_480p60 }, - { 1280, 720, 50, false, hdmiphy_conf74_25, hdmi_conf_720p50
[PATCH v3] drm: exynos: hdmi: sending AVI and AUI info frames
This patch adds code for composing AVI and AUI info frames and send them every VSYNC. This patch is important for hdmi certification. v1: - Remove un-necessary blank lines. - Change the case of hex constants. v2: - Added few blank lines. - Corrected comments format. - Added comments for 2's Complement calculation for check sum. v3: - Moved enums, macros to exynos_hdmi.c. - Corrected hex format. - Added static to hdmi_reg_infoframe. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com Signed-off-by: Fahad Kunnathadi faha...@samsung.com Signed-off-by: Shirish S s.shir...@samsung.com --- Based on exynos-drm-next branch of http://git.kernel.org/?p=linux/kernel/git/daeinki/drm-exynos.git drivers/gpu/drm/exynos/exynos_hdmi.c | 165 ++ drivers/gpu/drm/exynos/regs-hdmi.h | 17 +++- 2 files changed, 161 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 59839cc..1145be4 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -51,6 +51,29 @@ #define MAX_HEIGHT 1080 #define get_hdmi_context(dev) platform_get_drvdata(to_platform_device(dev)) +/* AVI header and aspect ratio */ +#define HDMI_AVI_VERSION 0x02 +#define HDMI_AVI_LENGTH0x0D +#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_LENGTH0x0A + +/* HDMI infoframe to configure HDMI out packet header, AUI and AVI */ +enum HDMI_PACKET_TYPE { + /* refer to Table 5-8 Packet Type in HDMI specification v1.4a */ + /* InfoFrame packet type */ + HDMI_PACKET_TYPE_INFOFRAME = 0x80, + /* Vendor-Specific InfoFrame */ + HDMI_PACKET_TYPE_VSI = HDMI_PACKET_TYPE_INFOFRAME + 1, + /* Auxiliary Video information InfoFrame */ + HDMI_PACKET_TYPE_AVI = HDMI_PACKET_TYPE_INFOFRAME + 2, + /* Audio information InfoFrame */ + HDMI_PACKET_TYPE_AUI = HDMI_PACKET_TYPE_INFOFRAME + 4 +}; + enum hdmi_type { HDMI_TYPE13, HDMI_TYPE14, @@ -183,6 +206,7 @@ struct hdmi_v13_conf { int height; int vrefresh; bool interlace; + int cea_video_id; const u8 *hdmiphy_data; const struct hdmi_v13_preset_conf *conf; }; @@ -354,15 +378,20 @@ static const struct hdmi_v13_preset_conf hdmi_v13_conf_1080p60 = { }; static const struct hdmi_v13_conf hdmi_v13_confs[] = { - { 1280, 720, 60, false, hdmiphy_v13_conf74_25, hdmi_v13_conf_720p60 }, - { 1280, 720, 50, false, hdmiphy_v13_conf74_25, hdmi_v13_conf_720p60 }, - { 720, 480, 60, false, hdmiphy_v13_conf27_027, hdmi_v13_conf_480p }, - { 1920, 1080, 50, true, hdmiphy_v13_conf74_25, hdmi_v13_conf_1080i50 }, - { 1920, 1080, 50, false, hdmiphy_v13_conf148_5, -hdmi_v13_conf_1080p50 }, - { 1920, 1080, 60, true, hdmiphy_v13_conf74_25, hdmi_v13_conf_1080i60 }, - { 1920, 1080, 60, false, hdmiphy_v13_conf148_5, -hdmi_v13_conf_1080p60 }, + { 1280, 720, 60, false, 4, hdmiphy_v13_conf74_25, + hdmi_v13_conf_720p60 }, + { 1280, 720, 50, false, 19, hdmiphy_v13_conf74_25, + hdmi_v13_conf_720p60 }, + { 720, 480, 60, false, 3, hdmiphy_v13_conf27_027, + hdmi_v13_conf_480p }, + { 1920, 1080, 50, true, 20, hdmiphy_v13_conf74_25, + hdmi_v13_conf_1080i50 }, + { 1920, 1080, 50, false, 31, hdmiphy_v13_conf148_5, + hdmi_v13_conf_1080p50 }, + { 1920, 1080, 60, true, 5, hdmiphy_v13_conf74_25, + hdmi_v13_conf_1080i60 }, + { 1920, 1080, 60, false, 16, hdmiphy_v13_conf148_5, + hdmi_v13_conf_1080p60 }, }; /* HDMI Version 1.4 */ @@ -480,6 +509,7 @@ struct hdmi_conf { int height; int vrefresh; bool interlace; + int cea_video_id; const u8 *hdmiphy_data; const struct hdmi_preset_conf *conf; }; @@ -935,16 +965,21 @@ static const struct hdmi_preset_conf hdmi_conf_1080p60 = { }; static const struct hdmi_conf hdmi_confs[] = { - { 720, 480, 60, false, hdmiphy_conf27_027, hdmi_conf_480p60 }, - { 1280, 720, 50, false, hdmiphy_conf74_25, hdmi_conf_720p50 }, - { 1280, 720, 60, false, hdmiphy_conf74_25, hdmi_conf_720p60 }, - { 1920, 1080, 50, true, hdmiphy_conf74_25, hdmi_conf_1080i50 }, - { 1920, 1080, 60, true, hdmiphy_conf74_25, hdmi_conf_1080i60 }, - { 1920, 1080, 30, false, hdmiphy_conf74_176, hdmi_conf_1080p30 }, - { 1920, 1080, 50, false, hdmiphy_conf148_5, hdmi_conf_1080p50 }, - { 1920, 1080, 60, false, hdmiphy_conf148_5, hdmi_conf_1080p60 }, + { 720, 480, 60, false, 3, hdmiphy_conf27_027, hdmi_conf_480p60 }, + { 1280, 720, 50, false, 19,