Skip to contentSkip to conversation

drm/exynos: fixed exynos drm driver.

PATCH Superseded Inki Dae 2 participants 13 messages Feb 14, 2012 – Feb 15, 2012

Subsystems (3)
lore
Share & tools
lore

Inki Dae

author maintainer
#0 lore raw

cover drm/exynos: fixed exynos drm driver.

this patch set fixes page flip and mode setting issues and also hdmi v1.4 support.

this is based on git repository below:
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git,
branch name: drm-fixes
commit-id: 28a4d5675857f6386930a324317281cb8ed1e5d0

and you can refer to our working repository below:
http://git.infradead.org/users/kmpark/linux-2.6-samsung,
branch name: exynos-drm-fixes

Thanks.

Eun-Chul Kim (1):
drm/exynos: added panel physical size.

Inki Dae (5):
drm/exynos: added possible_clones setup function. drm/exynos: fixed page flip issue.
drm/exynos: removed exynos_drm_fbdev_recreate function. drm/exynos: added mode_fixup feature and code clean. drm/exynos: added postclose to release resource.

Joonyoung Shim (4):
drm/exynos: added hdmi version 1.4 support. drm/exynos: fixed hdmi 720p config.
drm/exynos: changed priority of mixer layers. drm/exynos: removed pageflip_event_list init code when closed.

Masanari Iida (1):
drm/exynos: Fix typo in exynos_mixer.c

 drivers/gpu/drm/exynos/exynos_drm_connector.c |   41 +-
 drivers/gpu/drm/exynos/exynos_drm_core.c      |    3 +
 drivers/gpu/drm/exynos/exynos_drm_crtc.c      |   12 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c       |   26 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.h       |   12 +-
 drivers/gpu/drm/exynos/exynos_drm_encoder.c   |   51 +-
 drivers/gpu/drm/exynos/exynos_drm_encoder.h   |    1 +
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c     |   70 +--
 drivers/gpu/drm/exynos/exynos_drm_fimd.c      |   34 +-
 drivers/gpu/drm/exynos/exynos_drm_hdmi.c      |   28 +
 drivers/gpu/drm/exynos/exynos_drm_hdmi.h      |    5 +
 drivers/gpu/drm/exynos/exynos_hdmi.c          | 1225 +++++++++++++++++++++++--
 drivers/gpu/drm/exynos/exynos_hdmi.h          |   10 +-
 drivers/gpu/drm/exynos/exynos_mixer.c         |   19 +-
 drivers/gpu/drm/exynos/regs-hdmi.h            |  306 ++++++-
 include/drm/exynos_drm.h                      |   19 +-
 16 files changed, 1601 insertions(+), 261 deletions(-)
Signature · 1 line
1.7.4.1
author maintainer
#1 lore raw

PATCH 1/11 drm/exynos: Fix typo in exynos_mixer.c

From: Masanari Iida <[email protected]>

Correct spelling "sucessful" to "successful" in
drivers/gpu/drm/exynos/exynos_mixer.c

---
 drivers/gpu/drm/exynos/exynos_mixer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/exynos/exynos_mixer.c +1 -1
index ac24cff..33afd0c 100644
@@ -1044,7 +1044,7 @@ static int mixer_remove(struct platform_device *pdev)
 					platform_get_drvdata(pdev);
 	struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx;
 
-	dev_info(dev, "remove sucessful\n");
+	dev_info(dev, "remove successful\n");
 
 	mixer_resource_poweroff(ctx);
 	mixer_resources_cleanup(ctx);
Signature · 1 line
1.7.4.1
maintainer
#2 lore raw
In reply to Inki Dae
Quoted 2 lines · Inki Dae

this patch set fixes page flip and mode setting issues and also hdmi v1.4 support.

Adding hdmi v1.4 support doesn't seem like a fix to me, it seems like a new feature.

This should be in a -next tree, if you want to have fixes in 3.3 then please resend a -fixes tree
with no new features, and put hdmi1.4 into a -next branch.

Dave.

author maintainer
#3 lore raw

Hi, Dave.

I'm so sorry. I will resent it removing new feature.

Thanks,
Inki Dae

Quoted 20 lines

-----Original Message-----
From: Dave Airlie [mailto:[email protected]]
Sent: Tuesday, February 14, 2012 7:54 PM
To: Inki Dae
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 00/11] drm/exynos: fixed exynos drm driver.

Quoted 2 lines · Inki Dae

this patch set fixes page flip and mode setting issues and also hdmi v1.4 support.

Adding hdmi v1.4 support doesn't seem like a fix to me, it seems like a new feature.

This should be in a -next tree, if you want to have fixes in 3.3 then please resend a -fixes tree
with no new features, and put hdmi1.4 into a -next branch.

Dave.

author maintainer
#4 lore raw

cover drm/exynos: fixed exynos drm driver.

In reply to Inki Dae

I am resending the patch set removing new features from previous one. this patch set fixes page flip issue and releases some resources and these new features will be sent to drm-next later.

this is based on git repository below:
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git,
branch name: drm-fixes
commit-id: 6f9f8a61089bb177e53e14ee62f4a65134f3692f

and you can refer to our working repository below:
http://git.infradead.org/users/kmpark/linux-2.6-samsung,
branch name: exynos-drm-fixes

Thanks.

Eun-Chul Kim (1):
drm/exynos: added panel physical size.

Inki Dae (4):
drm/exynos: added possible_clones setup function. drm/exynos: fixed page flip issue.
drm/exynos: removed exynos_drm_fbdev_recreate function. drm/exynos: added postclose to release resource.

Joonyoung Shim (2):
drm/exynos: changed priority of mixer layers. drm/exynos: removed pageflip_event_list init code when closed.

Kamil Debski (1):
drm/exynos: exynos_drm.h header file fixes

Masanari Iida (1):
drm/exynos: Fix typo in exynos_mixer.c

 drivers/gpu/drm/exynos/exynos_drm_connector.c |   16 ++++--
 drivers/gpu/drm/exynos/exynos_drm_core.c      |    3 +
 drivers/gpu/drm/exynos/exynos_drm_crtc.c      |    6 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c       |   26 ++++++---
 drivers/gpu/drm/exynos/exynos_drm_drv.h       |    4 +-
 drivers/gpu/drm/exynos/exynos_drm_encoder.c   |   34 ++++++++++++
 drivers/gpu/drm/exynos/exynos_drm_encoder.h   |    1 +
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c     |   70 ++-----------------------
 drivers/gpu/drm/exynos/exynos_drm_fimd.c      |   34 +++++++-----
 drivers/gpu/drm/exynos/exynos_mixer.c         |   19 ++++---
 include/drm/Kbuild                            |    1 +
 include/drm/exynos_drm.h                      |   22 +++++++-
 12 files changed, 128 insertions(+), 108 deletions(-)
Signature · 1 line
1.7.4.1
author maintainer
#5 lore raw

PATCH RESEND 1/9 drm/exynos: Fix typo in exynos_mixer.c

From: Masanari Iida <[email protected]>

Correct spelling "sucessful" to "successful" in
drivers/gpu/drm/exynos/exynos_mixer.c

---
 drivers/gpu/drm/exynos/exynos_mixer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/exynos/exynos_mixer.c +1 -1
index ac24cff..33afd0c 100644
@@ -1044,7 +1044,7 @@ static int mixer_remove(struct platform_device *pdev)
 					platform_get_drvdata(pdev);
 	struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx;
 
-	dev_info(dev, "remove sucessful\n");
+	dev_info(dev, "remove successful\n");
 
 	mixer_resource_poweroff(ctx);
 	mixer_resources_cleanup(ctx);
Signature · 1 line
1.7.4.1
author maintainer
#6 lore raw

PATCH RESEND 2/9 drm/exynos: changed priority of mixer layers.

In reply to Inki Dae

From: Joonyoung Shim <[email protected]>

---
 drivers/gpu/drm/exynos/exynos_mixer.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/exynos/exynos_mixer.c +5 -5
index 33afd0c..4796167 100644
@@ -779,15 +779,15 @@ static void mixer_win_reset(struct mixer_context *ctx)
 	mixer_reg_writemask(res, MXR_STATUS, MXR_STATUS_16_BURST,
 		MXR_STATUS_BURST_MASK);
 
-	/* setting default layer priority: layer1 > video > layer0
+	/* setting default layer priority: layer1 > layer0 > video
 	 * because typical usage scenario would be
+	 * layer1 - OSD
 	 * layer0 - framebuffer
 	 * video - video overlay
-	 * layer1 - OSD
 	 */
-	val  = MXR_LAYER_CFG_GRP0_VAL(1);
-	val |= MXR_LAYER_CFG_VP_VAL(2);
-	val |= MXR_LAYER_CFG_GRP1_VAL(3);
+	val = MXR_LAYER_CFG_GRP1_VAL(3);
+	val |= MXR_LAYER_CFG_GRP0_VAL(2);
+	val |= MXR_LAYER_CFG_VP_VAL(1);
 	mixer_reg_write(res, MXR_LAYER_CFG, val);
 
 	/* setting background color */
Signature · 1 line
1.7.4.1
author maintainer
#7 lore raw

PATCH RESEND 3/9 drm/exynos: removed pageflip_event_list init code when closed.

In reply to Inki Dae

From: Joonyoung Shim <[email protected]>

if one process is terminated by ctrl-c while two processes are using pageflip feature then for last pageflip event,
user can't get poll from kernel side so this patch fixes the problem.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +2 -8
index 35889ca..2ef12aa 100644
@@ -141,16 +141,10 @@ static int exynos_drm_unload(struct drm_device *dev)
 }
 
 static void exynos_drm_preclose(struct drm_device *dev,
-					struct drm_file *file_priv)
+					struct drm_file *file)
 {
-	struct exynos_drm_private *dev_priv = dev->dev_private;
+	DRM_DEBUG_DRIVER("%s\n", __FILE__);
 
-	/*
-	 * drm framework frees all events at release time,
-	 * so private event list should be cleared.
-	 */
-	if (!list_empty(&dev_priv->pageflip_event_list))
-		INIT_LIST_HEAD(&dev_priv->pageflip_event_list);
 }
 
 static void exynos_drm_lastclose(struct drm_device *dev)
Signature · 1 line
1.7.4.1
author maintainer
#8 lore raw

PATCH RESEND 4/9 drm/exynos: added possible_clones setup function.

In reply to Inki Dae

basically, all crtcs are possible to clone each other.

---
 drivers/gpu/drm/exynos/exynos_drm_core.c    |    3 ++
 drivers/gpu/drm/exynos/exynos_drm_drv.c     |    4 +++
 drivers/gpu/drm/exynos/exynos_drm_encoder.c |   34 +++++++++++++++++++++++++++
 drivers/gpu/drm/exynos/exynos_drm_encoder.h |    1 +
 4 files changed, 42 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_core.c +3 -0
index 661a035..d08a558 100644
@@ -193,6 +193,9 @@ int exynos_drm_subdrv_register(struct exynos_drm_subdrv *subdrv)
 			return err;
 		}
 
+		/* setup possible_clones. */
+		exynos_drm_encoder_setup(drm_dev);
+
 		/*
 		 * if any specific driver such as fimd or hdmi driver called
 		 * exynos_drm_subdrv_register() later than drm_load(),
drivers/gpu/drm/exynos/exynos_drm_drv.c +4 -0
index 2ef12aa..76a111f 100644
@@ -33,6 +33,7 @@
 
 #include "exynos_drm_drv.h"
 #include "exynos_drm_crtc.h"
+#include "exynos_drm_encoder.h"
 #include "exynos_drm_fbdev.h"
 #include "exynos_drm_fb.h"
 #include "exynos_drm_gem.h"
@@ -99,6 +100,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
 	if (ret)
 		goto err_vblank;
 
+	/* setup possible_clones. */
+	exynos_drm_encoder_setup(dev);
+
 	/*
 	 * create and configure fb helper and also exynos specific
 	 * fbdev object.
drivers/gpu/drm/exynos/exynos_drm_encoder.c +34 -0
index 86b93dd..ef4754f 100644
@@ -195,6 +195,40 @@ static struct drm_encoder_funcs exynos_encoder_funcs = {
 	.destroy = exynos_drm_encoder_destroy,
 };
 
+static unsigned int exynos_drm_encoder_clones(struct drm_encoder *encoder)
+{
+	struct drm_encoder *clone;
+	struct drm_device *dev = encoder->dev;
+	struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
+	struct exynos_drm_display_ops *display_ops =
+				exynos_encoder->manager->display_ops;
+	unsigned int clone_mask = 0;
+	int cnt = 0;
+
+	list_for_each_entry(clone, &dev->mode_config.encoder_list, head) {
+		switch (display_ops->type) {
+		case EXYNOS_DISPLAY_TYPE_LCD:
+		case EXYNOS_DISPLAY_TYPE_HDMI:
+			clone_mask |= (1 << (cnt++));
+			break;
+		default:
+			continue;
+		}
+	}
+
+	return clone_mask;
+}
+
+void exynos_drm_encoder_setup(struct drm_device *dev)
+{
+	struct drm_encoder *encoder;
+
+	DRM_DEBUG_KMS("%s\n", __FILE__);
+
+	list_for_each_entry(encoder, &dev->mode_config.encoder_list, head)
+		encoder->possible_clones = exynos_drm_encoder_clones(encoder);
+}
+
 struct drm_encoder *
 exynos_drm_encoder_create(struct drm_device *dev,
 			   struct exynos_drm_manager *manager,
drivers/gpu/drm/exynos/exynos_drm_encoder.h +1 -0
index 97b087a..eb7d231 100644
@@ -30,6 +30,7 @@
 
 struct exynos_drm_manager;
 
+void exynos_drm_encoder_setup(struct drm_device *dev);
 struct drm_encoder *exynos_drm_encoder_create(struct drm_device *dev,
 					       struct exynos_drm_manager *mgr,
 					       unsigned int possible_crtcs);
Signature · 1 line
1.7.4.1
author maintainer
#9 lore raw

PATCH RESEND 5/9 drm/exynos: fixed page flip issue.

In reply to Inki Dae

with vblank_refcount = 1, there was the case that drm_vblank_put is called by specific page flip function so this patch fixes the issue.

---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |    6 +++---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |    7 ++++++-
 drivers/gpu/drm/exynos/exynos_mixer.c    |    7 ++++++-
 3 files changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +3 -3
index e3861ac..de81883 100644
@@ -307,9 +307,6 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 		 */
 		event->pipe = exynos_crtc->pipe;
 
-		list_add_tail(&event->base.link,
-				&dev_priv->pageflip_event_list);
-
 		ret = drm_vblank_get(dev, exynos_crtc->pipe);
 		if (ret) {
 			DRM_DEBUG("failed to acquire vblank counter\n");
@@ -318,6 +315,9 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 			goto out;
 		}
 
+		list_add_tail(&event->base.link,
+				&dev_priv->pageflip_event_list);
+
 		crtc->fb = fb;
 		ret = exynos_drm_crtc_update(crtc);
 		if (ret) {
drivers/gpu/drm/exynos/exynos_drm_fimd.c +6 -1
index b6a737d..0dbb32b 100644
@@ -604,7 +604,12 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 	}
 
 	if (is_checked) {
-		drm_vblank_put(drm_dev, crtc);
+		/*
+		 * call drm_vblank_put only in case that drm_vblank_get was
+		 * called.
+		 */
+		if (atomic_read(&drm_dev->vblank_refcount[crtc]) > 0)
+			drm_vblank_put(drm_dev, crtc);
 
 		/*
 		 * don't off vblank if vblank_disable_allowed is 1,
drivers/gpu/drm/exynos/exynos_mixer.c +6 -1
index 4796167..93846e8 100644
@@ -712,7 +712,12 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc)
 	}
 
 	if (is_checked)
-		drm_vblank_put(drm_dev, crtc);
+		/*
+		 * call drm_vblank_put only in case that drm_vblank_get was
+		 * called.
+		 */
+		if (atomic_read(&drm_dev->vblank_refcount[crtc]) > 0)
+			drm_vblank_put(drm_dev, crtc);
 
 	spin_unlock_irqrestore(&drm_dev->event_lock, flags);
 }
Signature · 1 line
1.7.4.1
author maintainer
#10 lore raw

PATCH RESEND 6/9 drm/exynos: removed exynos_drm_fbdev_recreate function.

In reply to Inki Dae

this function ins't needed anymore.

---
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |   70 ++---------------------------
 1 files changed, 4 insertions(+), 66 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +4 -66
index d7ae29d..3508700 100644
@@ -195,66 +195,6 @@ out:
 	return ret;
 }
 
-static bool
-exynos_drm_fbdev_is_samefb(struct drm_framebuffer *fb,
-			    struct drm_fb_helper_surface_size *sizes)
-{
-	if (fb->width != sizes->surface_width)
-		return false;
-	if (fb->height != sizes->surface_height)
-		return false;
-	if (fb->bits_per_pixel != sizes->surface_bpp)
-		return false;
-	if (fb->depth != sizes->surface_depth)
-		return false;
-
-	return true;
-}
-
-static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper,
-				      struct drm_fb_helper_surface_size *sizes)
-{
-	struct drm_device *dev = helper->dev;
-	struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);
-	struct exynos_drm_gem_obj *exynos_gem_obj;
-	struct drm_framebuffer *fb = helper->fb;
-	struct drm_mode_fb_cmd2 mode_cmd = { 0 };
-	unsigned long size;
-
-	DRM_DEBUG_KMS("%s\n", __FILE__);
-
-	if (exynos_drm_fbdev_is_samefb(fb, sizes))
-		return 0;
-
-	mode_cmd.width = sizes->surface_width;
-	mode_cmd.height = sizes->surface_height;
-	mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3);
-	mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
-							  sizes->surface_depth);
-
-	if (exynos_fbdev->exynos_gem_obj)
-		exynos_drm_gem_destroy(exynos_fbdev->exynos_gem_obj);
-
-	if (fb->funcs->destroy)
-		fb->funcs->destroy(fb);
-
-	size = mode_cmd.pitches[0] * mode_cmd.height;
-	exynos_gem_obj = exynos_drm_gem_create(dev, size);
-	if (IS_ERR(exynos_gem_obj))
-		return PTR_ERR(exynos_gem_obj);
-
-	exynos_fbdev->exynos_gem_obj = exynos_gem_obj;
-
-	helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd,
-			&exynos_gem_obj->base);
-	if (IS_ERR_OR_NULL(helper->fb)) {
-		DRM_ERROR("failed to create drm framebuffer.\n");
-		return PTR_ERR(helper->fb);
-	}
-
-	return exynos_drm_fbdev_update(helper, helper->fb);
-}
-
 static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper,
 				   struct drm_fb_helper_surface_size *sizes)
 {
@@ -262,6 +202,10 @@ static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper,
 
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
+	/*
+	 * with !helper->fb, it means that this funcion is called first time
+	 * and after that, the helper->fb would be used as clone mode.
+	 */
 	if (!helper->fb) {
 		ret = exynos_drm_fbdev_create(helper, sizes);
 		if (ret < 0) {
@@ -274,12 +218,6 @@ static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper,
 		 * because register_framebuffer() should be called.
 		 */
 		ret = 1;
-	} else {
-		ret = exynos_drm_fbdev_recreate(helper, sizes);
-		if (ret < 0) {
-			DRM_ERROR("failed to reconfigure fbdev\n");
-			return ret;
-		}
 	}
 
 	return ret;
Signature · 1 line
1.7.4.1
author maintainer
#11 lore raw

PATCH RESEND 7/9 drm/exynos: added postclose to release resource.

In reply to Inki Dae
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +12 -0
index 76a111f..58820eb 100644
@@ -151,6 +151,17 @@ static void exynos_drm_preclose(struct drm_device *dev,
 
 }
 
+static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
+{
+	DRM_DEBUG_DRIVER("%s\n", __FILE__);
+
+	if (!file->driver_priv)
+		return;
+
+	kfree(file->driver_priv);
+	file->driver_priv = NULL;
+}
+
 static void exynos_drm_lastclose(struct drm_device *dev)
 {
 	DRM_DEBUG_DRIVER("%s\n", __FILE__);
@@ -193,6 +204,7 @@ static struct drm_driver exynos_drm_driver = {
 	.unload			= exynos_drm_unload,
 	.preclose		= exynos_drm_preclose,
 	.lastclose		= exynos_drm_lastclose,
+	.postclose		= exynos_drm_postclose,
 	.get_vblank_counter	= drm_vblank_count,
 	.enable_vblank		= exynos_drm_crtc_enable_vblank,
 	.disable_vblank		= exynos_drm_crtc_disable_vblank,
Signature · 1 line
1.7.4.1
author maintainer
#12 lore raw

PATCH RESEND 9/9 drm/exynos: exynos_drm.h header file fixes

In reply to Inki Dae

From: Kamil Debski <[email protected]>

First of all #ifdef __KERNEL__ was added to exynos_drm.h to mark the part that should be left out of userspace. Secondly exynos_drm.h was added to include/drm/Kbuild, so it will be included when doing make headers_install.

---
 include/drm/Kbuild       |    1 +
 include/drm/exynos_drm.h |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)
include/drm/Kbuild +1 -0
index a5c0e10..1e38a19 100644
@@ -2,6 +2,7 @@ header-y += drm.h
 header-y += drm_fourcc.h
 header-y += drm_mode.h
 header-y += drm_sarea.h
+header-y += exynos_drm.h
 header-y += i810_drm.h
 header-y += i915_drm.h
 header-y += mga_drm.h
include/drm/exynos_drm.h +4 -1
index 308575e..1ed3aae 100644
@@ -97,6 +97,8 @@ struct drm_exynos_plane_set_zpos {
 #define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS	DRM_IOWR(DRM_COMMAND_BASE + \
 		DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos)
 
+#ifdef __KERNEL__
+
 /**
  * A structure for lcd panel information.
  *
@@ -152,4 +154,5 @@ struct exynos_drm_hdmi_pdata {
 	unsigned int			bpp;
 };
 
-#endif
+#endif	/* __KERNEL__ */
+#endif	/* _EXYNOS_DRM_H_ */
Signature · 1 line
1.7.4.1