[PATCH 1/1] drm/exynos: Fix build error in exynos_hdmi.c (original) (raw)

Sachin Kamat sachin.kamat at linaro.org
Mon Feb 3 19:19:25 PST 2014


On 4 February 2014 05:05, Sean Paul <seanpaul at chromium.org> wrote:

On Mon, Feb 3, 2014 at 7:14 AM, Inki Dae <inki.dae at samsung.com> wrote:

2014-01-31 Josh Boyer <jwboyer at fedoraproject.org>:

On Fri, Jan 31, 2014 at 1:09 AM, Sachin Kamat <sachin.kamat at linaro.org> wrote:

'hdmiinfoframe' is already defined in include/linux/hdmi.h. Rename the local variable to avoid the following build error: drivers/gpu/drm/exynos/exynoshdmi.c:382:8: error: 'hdmiinfoframe' defined as wrong kind of tag struct hdmiinfoframe {

Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org> Reported-by: Josh Boyer <jwboyer at fedoraproject.org> This does fix the build error I saw. I don't have hardware to test the results with, but it now compiles correctly. Thanks for the quick turn around! Hi, Thanks for report and patch. But Sean posted already below patch, [PATCH v4 01/34] drm/exynos: Rename hdmiinfoframe to avoid collision Yeah, sorry, I just tucked it in with the rest of my stuff :)

No worries as long as the issue gets addressed :)

However, since these patches are not yet merged, IMHO it would be better to address this issue by re-using the common definitions provided rather than having local (duplicate) definitions for the same. Below is the patch which I have also posted to the mailing list for reference. Please check.


diff --git a/drivers/gpu/drm/exynos/ exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index a0e10ae..c021ddc 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -34,6 +34,7 @@ #include <linux/io.h> #include <linux/of.h> #include <linux/of_gpio.h> +#include <linux/hdmi.h>

#include <drm/exynos_drm.h>

@@ -59,19 +60,6 @@ #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, @@ -379,12 +367,6 @@ static const struct hdmiphy_config hdmiphy_v14_configs[] = { }, };

-struct hdmi_infoframe { - enum HDMI_PACKET_TYPE type; - u8 ver; - u8 len; -};

static inline u32 hdmi_reg_read(struct hdmi_context *hdata, u32 reg_id) { return readl(hdata->regs + reg_id); @@ -682,7 +664,7 @@ static u8 hdmi_chksum(struct hdmi_context *hdata, }

static void hdmi_reg_infoframe(struct hdmi_context *hdata,

{ u32 hdr_sum; u8 chksum; @@ -700,13 +682,15 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata, return; }

@@ -722,18 +706,20 @@ static void hdmi_reg_infoframe(struct hdmi_context *hdata, hdmi_reg_writeb(hdata, HDMI_AVI_BYTE(4), vic);

            chksum = hdmi_chksum(hdata, HDMI_AVI_BYTE(1),

@@ -985,7 +971,7 @@ static void hdmi_conf_reset(struct hdmi_context *hdata)

static void hdmi_conf_init(struct hdmi_context *hdata) {

@@ -1021,14 +1007,14 @@ static void hdmi_conf_init(struct hdmi_context *hdata) hdmi_reg_writeb(hdata, HDMI_V13_AUI_CON, 0x02); hdmi_reg_writeb(hdata, HDMI_V13_ACR_CON, 0x04); } else {

-- With warm regards, Sachin



More information about the dri-devel mailing list