Skip to contentSkip to conversation

drm/exynos: add two devices support.

PATCH RESEND New Inki Dae 1 participant 8 messages Oct 14, 2011 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Inki Dae

author maintainer
#1 lore raw

cover drm/exynos: add two devices support.

I am sending patch sets again because of some conflicts. I am sorry for that.

the patch sets are as the following.
- updated common overlay structure to support hdmi.
- fixed page flip feature for two devices to be supported.
- fixed a bug that fbdev reinitialization is failed.
- added comments and code clean.

this patch is based on git repository below:
git://people.freedesktop.org/~airlied/linux.git
branch name: drm-next
commit-id: b07759bf41d52aaecd5de92c7d725d6834b23349

Inki Dae (5):
drm/exynos: fixed overlay data updating.
drm/exynos: added device object as argument of subdrv_probe(). drm/exynos: fixed bug to exynos_drm_fb_dev_reinit(). drm/exynos: added comments and code clean. drm/exynos: fixed build warnings and comments.

Seung-Woo Kim (1):
drm/exynos: fixed page flip bug.

Joonyoung Shim (1):
drm/exynos: fixed overlay updating time at page flip.

 drivers/gpu/drm/exynos/exynos_drm_buf.h   |    3 +
 drivers/gpu/drm/exynos/exynos_drm_core.c  |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  123 +++++++++++++++++++----------
 drivers/gpu/drm/exynos/exynos_drm_crtc.h  |    1 -
 drivers/gpu/drm/exynos/exynos_drm_drv.c   |   14 +++
 drivers/gpu/drm/exynos/exynos_drm_drv.h   |   50 +++++++-----
 drivers/gpu/drm/exynos/exynos_drm_fb.c    |   20 ++---
 drivers/gpu/drm/exynos/exynos_drm_fb.h    |   10 ---
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |   39 ++++++---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  |   89 ++++++++++++---------
 10 files changed, 215 insertions(+), 136 deletions(-)
Signature · 1 line
1.7.4.1
author maintainer
#2 lore raw

PATCH RESEND 1/7 drm/exynos: fixed overlay data updating.

this patch adds common members to overlay structure and makes each driver such as fimd or hdmi driver set them to its own structure.

---
 drivers/gpu/drm/exynos/exynos_drm_buf.h   |    3 +
 drivers/gpu/drm/exynos/exynos_drm_crtc.c  |  101 ++++++++++++++++++-----------
 drivers/gpu/drm/exynos/exynos_drm_drv.h   |   41 ++++++++----
 drivers/gpu/drm/exynos/exynos_drm_fb.c    |   20 ++----
 drivers/gpu/drm/exynos/exynos_drm_fb.h    |   10 ---
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |   31 ++++++---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  |   59 ++++++++++++-----
 7 files changed, 162 insertions(+), 103 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_buf.h +3 -0
index 9b1f0fb..045d59e 100644
@@ -43,6 +43,9 @@ struct exynos_drm_buf_entry {
 struct exynos_drm_buf_entry *exynos_drm_buf_create(struct drm_device *dev,
 		unsigned int size);
 
+/* get physical memory information of a drm framebuffer. */
+struct exynos_drm_buf_entry *exynos_drm_fb_get_buf(struct drm_framebuffer *fb);
+
 /* remove allocated physical memory. */
 void exynos_drm_buf_destroy(struct drm_device *dev,
 		struct exynos_drm_buf_entry *entry);
drivers/gpu/drm/exynos/exynos_drm_crtc.c +62 -39

141 lines not on this page · raw message

drivers/gpu/drm/exynos/exynos_drm_drv.h +28 -13

62 lines not on this page · raw message

drivers/gpu/drm/exynos/exynos_drm_fb.c +7 -13
index 4505d90..48d29cf 100644
@@ -220,28 +220,22 @@ struct drm_framebuffer *exynos_drm_fb_create(struct drm_device *dev,
 	return exynos_drm_fb_init(file_priv, dev, mode_cmd);
 }
 
-void exynos_drm_fb_update_buf_off(struct drm_framebuffer *fb,
-				   unsigned int x, unsigned int y,
-				   struct exynos_drm_buffer_info *info)
+struct exynos_drm_buf_entry *exynos_drm_fb_get_buf(struct drm_framebuffer *fb)
 {
 	struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb);
 	struct exynos_drm_buf_entry *entry;
-	unsigned long offset;
 
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
-	offset = x * (fb->bits_per_pixel >> 3);
-	offset += y * fb->pitch;
-
 	entry = exynos_fb->entry;
+	if (!entry)
+		return NULL;
 
-	info->base_addr = entry->paddr;
-	info->vaddr = entry->vaddr + offset;
-	info->paddr = entry->paddr + offset;
+	DRM_DEBUG_KMS("vaddr = 0x%lx, paddr = 0x%lx\n",
+			(unsigned long)entry->vaddr,
+			(unsigned long)entry->paddr);
 
-	DRM_DEBUG_KMS("updated vaddr = 0x%lx, paddr = 0x%lx, offset = 0x%x\n",
-			(unsigned long)info->vaddr, (unsigned long)info->paddr,
-			(unsigned int)offset);
+	return entry;
 }
 
 static struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
drivers/gpu/drm/exynos/exynos_drm_fb.h +0 -10
index eaa478a..eb35931 100644
@@ -28,16 +28,6 @@
 #ifndef _EXYNOS_DRM_FB_H_
 #define _EXYNOS_DRM_FB_H
 
-struct exynos_drm_buffer_info {
-	unsigned long base_addr;
-	dma_addr_t paddr;
-	void __iomem *vaddr;
-};
-
-void exynos_drm_fb_update_buf_off(struct drm_framebuffer *fb,
-				   unsigned int x, unsigned int y,
-				   struct exynos_drm_buffer_info *info);
-
 struct drm_framebuffer *exynos_drm_fb_create(struct drm_device *dev,
 					      struct drm_file *filp,
 					      struct drm_mode_fb_cmd *mode_cmd);
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +20 -11
index ac43bfc..6134515 100644
@@ -33,6 +33,7 @@
 
 #include "exynos_drm_drv.h"
 #include "exynos_drm_fb.h"
+#include "exynos_drm_buf.h"
 
 #define MAX_CONNECTOR		4
 #define PREFERRED_BPP		32
@@ -83,7 +84,7 @@ static struct fb_ops exynos_drm_fb_ops = {
 	.fb_setcmap	= drm_fb_helper_setcmap,
 };
 
-static void exynos_drm_fbdev_update(struct drm_fb_helper *helper,
+static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
 				     struct drm_framebuffer *fb,
 				     unsigned int fb_width,
 				     unsigned int fb_height)
@@ -91,8 +92,9 @@ static void exynos_drm_fbdev_update(struct drm_fb_helper *helper,
 	struct fb_info *fbi = helper->fbdev;
 	struct drm_device *dev = helper->dev;
 	struct exynos_drm_fbdev *exynos_fb = to_exynos_fbdev(helper);
-	struct exynos_drm_buffer_info buffer_info;
+	struct exynos_drm_buf_entry *entry;
 	unsigned int size = fb_width * fb_height * (fb->bits_per_pixel >> 3);
+	unsigned long offset;
 
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
@@ -101,15 +103,22 @@ static void exynos_drm_fbdev_update(struct drm_fb_helper *helper,
 	drm_fb_helper_fill_fix(fbi, fb->pitch, fb->depth);
 	drm_fb_helper_fill_var(fbi, helper, fb_width, fb_height);
 
-	exynos_drm_fb_update_buf_off(fb, fbi->var.xoffset, fbi->var.yoffset,
-			&buffer_info);
+	entry = exynos_drm_fb_get_buf(fb);
+	if (!entry) {
+		DRM_LOG_KMS("entry is null.\n");
+		return -EFAULT;
+	}
 
-	dev->mode_config.fb_base = buffer_info.base_addr;
+	offset = fbi->var.xoffset * (fb->bits_per_pixel >> 3);
+	offset += fbi->var.yoffset * fb->pitch;
 
-	fbi->screen_base = buffer_info.vaddr;
+	dev->mode_config.fb_base = entry->paddr;
+	fbi->screen_base = entry->vaddr + offset;
+	fbi->fix.smem_start = entry->paddr + offset;
 	fbi->screen_size = size;
-	fbi->fix.smem_start = buffer_info.paddr;
 	fbi->fix.smem_len = size;
+
+	return 0;
 }
 
 static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
@@ -162,8 +171,10 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
 		goto out;
 	}
 
-	exynos_drm_fbdev_update(helper, helper->fb, sizes->fb_width,
+	ret = exynos_drm_fbdev_update(helper, helper->fb, sizes->fb_width,
 			sizes->fb_height);
+	if (ret < 0)
+		fb_dealloc_cmap(&fbi->cmap);
 
 /*
  * if failed, all resources allocated above would be released by
@@ -224,10 +235,8 @@ static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper,
 	}
 
 	helper->fb = exynos_fbdev->fb;
-	exynos_drm_fbdev_update(helper, helper->fb, sizes->fb_width,
+	return exynos_drm_fbdev_update(helper, helper->fb, sizes->fb_width,
 			sizes->fb_height);
-
-	return 0;
 }
 
 static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper,
drivers/gpu/drm/exynos/exynos_drm_fimd.c +42 -17

106 lines not on this page · raw message

Signature · 1 line
1.7.4.1
author maintainer
#3 lore raw

PATCH RESEND 2/7 drm/exynos: fixed overlay updating time at page flip.

In reply to Inki Dae

buffer addess is set to shadow register and then applied to real register at vsync front porch time.

---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |    4 +++-
 drivers/gpu/drm/exynos/exynos_drm_crtc.h |    1 -
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |    2 --
 3 files changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +3 -1
index 654bf3a..0587b52 100644
@@ -78,7 +78,7 @@ struct exynos_drm_crtc {
 	unsigned int			pipe;
 };
 
-void exynos_drm_crtc_apply(struct drm_crtc *crtc)
+static void exynos_drm_crtc_apply(struct drm_crtc *crtc)
 {
 	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
 	struct exynos_drm_overlay *overlay = &exynos_crtc->overlay;
@@ -279,6 +279,8 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 			goto out;
 		}
 
+		exynos_drm_crtc_apply(crtc);
+
 		dev_priv->pageflip_event = true;
 	}
 out:
drivers/gpu/drm/exynos/exynos_drm_crtc.h +0 -1
index 452b62b..c584042 100644
@@ -31,7 +31,6 @@
 
 struct exynos_drm_overlay *get_exynos_drm_overlay(struct drm_device *dev,
 		struct drm_crtc *crtc);
-void exynos_drm_crtc_apply(struct drm_crtc *crtc);
 int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr);
 int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int crtc);
 void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc);
drivers/gpu/drm/exynos/exynos_drm_fimd.c +0 -2
index 623ba33..9d1138e 100644
@@ -500,8 +500,6 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 
 	spin_lock_irqsave(&drm_dev->event_lock, flags);
 
-	exynos_drm_crtc_apply(dev_priv->crtc[crtc]);
-
 	list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
 			base.link) {
 		do_gettimeofday(&now);
Signature · 1 line
1.7.4.1
author maintainer
#4 lore raw

PATCH RESEND 3/7 drm/exynos: added device object as argument of subdrv_probe().

In reply to Inki Dae

sub drivers should refer to its own device object to access its own context.

---
 drivers/gpu/drm/exynos/exynos_drm_core.c |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.h  |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_core.c +1 -1
index edb0ee1..661a035 100644
@@ -55,7 +55,7 @@ static int exynos_drm_subdrv_probe(struct drm_device *dev,
 		 *
 		 * P.S. note that this driver is considered for modularization.
 		 */
-		ret = subdrv->probe(dev);
+		ret = subdrv->probe(dev, subdrv->manager.dev);
 		if (ret)
 			return ret;
 	}
drivers/gpu/drm/exynos/exynos_drm_drv.h +1 -1
index 4ea1371..002f292 100644
@@ -219,7 +219,7 @@ struct exynos_drm_subdrv {
 	struct list_head list;
 	struct drm_device *drm_dev;
 
-	int (*probe)(struct drm_device *dev);
+	int (*probe)(struct drm_device *drm_dev, struct device *dev);
 	void (*remove)(struct drm_device *dev);
 
 	struct exynos_drm_manager manager;
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1 -1
index 9d1138e..b0afa84 100644
@@ -538,7 +538,7 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int fimd_subdrv_probe(struct drm_device *drm_dev)
+static int fimd_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
 {
 	struct drm_driver *drm_driver = drm_dev->driver;
 
Signature · 1 line
1.7.4.1
author maintainer
#5 lore raw

PATCH RESEND 4/7 drm/exynos: fixed bug to exynos_drm_fb_dev_reinit().

In reply to Inki Dae

this patch solves the problem that fb_helper is released when exynos_drm_fbdev_reinit() was called. if this function call is ok then just return.

---
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +2 -0
index 6134515..4366dc5 100644
@@ -432,6 +432,8 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
 		return exynos_drm_fbdev_init(dev);
 	}
 
+	return ret;
+
 err:
 	/*
 	 * if drm_load() failed when drm load() was called prior
Signature · 1 line
1.7.4.1
author maintainer
#6 lore raw

PATCH RESEND 5/7 drm/exynos: added comments and code clean.

In reply to Inki Dae

this patch adds the following comments and code clean.
- add comment of exynos_drm_crtc_apply() call at page flip time.
- add comment that when exynos_drm_fbdev_reinit() is called, why num_connector is 0 and also the framebuffers should be destroyed.
- remove buf_off member from struct exynos_drm_overlay because this member isn't used anymore.

---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c  |    6 ++++++
 drivers/gpu/drm/exynos/exynos_drm_drv.h   |    2 --
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c |    6 +++++-
 3 files changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +6 -0
index 0587b52..8cd9d8e 100644
@@ -279,6 +279,12 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 			goto out;
 		}
 
+		/*
+		 * the values related to a buffer of the drm framebuffer
+		 * to be applied should be set at here. because these values
+		 * first, is set to shadow registers and then to
+		 * real registers at vsync front porch period.
+		 */
 		exynos_drm_crtc_apply(crtc);
 
 		dev_priv->pageflip_event = true;
drivers/gpu/drm/exynos/exynos_drm_drv.h +0 -2
index 002f292..63c1422 100644
@@ -82,7 +82,6 @@ struct exynos_drm_overlay_ops {
  * @paddr: bus(accessed by dma) physical memory address to this overlay
  *		and this is physically continuous.
  * @vaddr: virtual memory addresss to this overlay.
- * @buf_off: start offset of framebuffer to be displayed.
  * @default_win: a window to be enabled.
  * @color_key: color key on or off.
  * @index_color: if using color key feature then this value would be used
@@ -111,7 +110,6 @@ struct exynos_drm_overlay {
 	unsigned int pitch;
 	dma_addr_t paddr;
 	void __iomem *vaddr;
-	unsigned int buf_off;
 
 	bool default_win;
 	bool color_key;
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +5 -1
index 4366dc5..1f4b3d1 100644
@@ -393,6 +393,10 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
 	if (!private)
 		return -EINVAL;
 
+	/*
+	 * if all sub drivers were unloaded then num_connector is 0
+	 * so at this time, the framebuffers also should be destroyed.
+	 */
 	if (!dev->mode_config.num_connector) {
 		exynos_drm_fbdev_fini(dev);
 		return 0;
@@ -429,7 +433,7 @@ int exynos_drm_fbdev_reinit(struct drm_device *dev)
 		 * re-configure the fb helper. it means that this function
 		 * has been called by the specific drivers.
 		 */
-		return exynos_drm_fbdev_init(dev);
+		ret = exynos_drm_fbdev_init(dev);
 	}
 
 	return ret;
Signature · 1 line
1.7.4.1
author maintainer
#7 lore raw

PATCH RESEND 6/7 drm/exynos: fixed page flip bug.

In reply to Inki Dae

in case of using two drivers such as fimd and hdmi controller that they have their own hardware interrupt, drm framework doesn't provide pipe number corresponding to it. so the pipe should be set to event's from specific crtc.

---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |   16 +++++++++++-----
 drivers/gpu/drm/exynos/exynos_drm_drv.c  |   14 ++++++++++++++
 drivers/gpu/drm/exynos/exynos_drm_drv.h  |    3 +--
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   15 +++++++++------
 4 files changed, 35 insertions(+), 13 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +11 -5
index 8cd9d8e..9337e5e 100644
@@ -259,13 +259,21 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 
 	mutex_lock(&dev->struct_mutex);
 
-	if (event && !dev_priv->pageflip_event) {
+	if (event) {
+		/*
+		 * the pipe from user always is 0 so we can set pipe number
+		 * of current owner to event.
+		 */
+		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");
+			list_del(&event->base.link);
+
 			goto out;
 		}
 
@@ -274,7 +282,7 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 		if (ret) {
 			crtc->fb = old_fb;
 			drm_vblank_put(dev, exynos_crtc->pipe);
-			dev_priv->pageflip_event = false;
+			list_del(&event->base.link);
 
 			goto out;
 		}
@@ -282,12 +290,10 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 		/*
 		 * the values related to a buffer of the drm framebuffer
 		 * to be applied should be set at here. because these values
-		 * first, is set to shadow registers and then to
+		 * first, are set to shadow registers and then to
 		 * real registers at vsync front porch period.
 		 */
 		exynos_drm_crtc_apply(crtc);
-
-		dev_priv->pageflip_event = true;
 	}
 out:
 	mutex_unlock(&dev->struct_mutex);
drivers/gpu/drm/exynos/exynos_drm_drv.c +14 -0
index a190348..83810cb 100644
@@ -124,6 +124,19 @@ static int exynos_drm_unload(struct drm_device *dev)
 	return 0;
 }
 
+static void exynos_drm_preclose(struct drm_device *dev,
+					struct drm_file *file_priv)
+{
+	struct exynos_drm_private *dev_priv = dev->dev_private;
+
+	/*
+	 * 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)
 {
 	DRM_DEBUG_DRIVER("%s\n", __FILE__);
@@ -152,6 +165,7 @@ static struct drm_driver exynos_drm_driver = {
 				  DRIVER_MODESET | DRIVER_GEM,
 	.load			= exynos_drm_load,
 	.unload			= exynos_drm_unload,
+	.preclose		= exynos_drm_preclose,
 	.lastclose		= exynos_drm_lastclose,
 	.get_vblank_counter	= drm_vblank_count,
 	.enable_vblank		= exynos_drm_crtc_enable_vblank,
drivers/gpu/drm/exynos/exynos_drm_drv.h +1 -2
index 63c1422..915f5cd 100644
@@ -187,9 +187,8 @@ struct exynos_drm_manager {
 struct exynos_drm_private {
 	struct drm_fb_helper *fb_helper;
 
-	/* for pageflip */
+	/* list head for new event to be added. */
 	struct list_head pageflip_event_list;
-	bool pageflip_event;
 
 	/*
 	 * created crtc object would be contained at this array and
drivers/gpu/drm/exynos/exynos_drm_fimd.c +9 -6
index b0afa84..68446b3b 100644
@@ -487,21 +487,24 @@ static struct exynos_drm_overlay_ops fimd_overlay_ops = {
 	.disable = fimd_win_disable,
 };
 
-/* for pageflip event */
 static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 {
 	struct exynos_drm_private *dev_priv = drm_dev->dev_private;
 	struct drm_pending_vblank_event *e, *t;
 	struct timeval now;
 	unsigned long flags;
-
-	if (!dev_priv->pageflip_event)
-		return;
+	bool is_checked = false;
 
 	spin_lock_irqsave(&drm_dev->event_lock, flags);
 
 	list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
 			base.link) {
+		/* if event's pipe isn't same as crtc then ignor it. */
+		if (crtc != e->pipe)
+			continue;
+
+		is_checked = true;
+
 		do_gettimeofday(&now);
 		e->event.sequence = 0;
 		e->event.tv_sec = now.tv_sec;
@@ -511,8 +514,8 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 		wake_up_interruptible(&e->base.file_priv->event_wait);
 	}
 
-	drm_vblank_put(drm_dev, crtc);
-	dev_priv->pageflip_event = false;
+	if (is_checked)
+		drm_vblank_put(drm_dev, crtc);
 
 	spin_unlock_irqrestore(&drm_dev->event_lock, flags);
 }
Signature · 1 line
1.7.4.1
author maintainer
#8 lore raw

PATCH RESEND 7/7 drm/exynos: fixed build warnings and comments.

In reply to Inki Dae
---
 drivers/gpu/drm/exynos/exynos_drm_drv.h  |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   13 +------------
 2 files changed, 2 insertions(+), 13 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +1 -1
index 915f5cd..c03683f 100644
@@ -123,7 +123,7 @@ struct exynos_drm_overlay {
  * Exynos DRM Display Structure.
  *	- this structure is common to analog tv, digital tv and lcd panel.
  *
- * @type: one of exynos_DISPLAY_TYPE_LCD and HDMI.
+ * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI.
  * @is_connected: check for that display is connected or not.
  * @get_edid: get edid modes from display driver.
  * @get_timing: get timing object from display driver.
drivers/gpu/drm/exynos/exynos_drm_fimd.c +1 -12
index 68446b3b..4659c88 100644
@@ -90,8 +90,6 @@ struct fimd_context {
 
 static bool fimd_display_is_connected(struct device *dev)
 {
-	struct fimd_context *ctx = get_fimd_context(dev);
-
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
 	/* TODO. */
@@ -110,8 +108,6 @@ static void *fimd_get_timing(struct device *dev)
 
 static int fimd_check_timing(struct device *dev, void *timing)
 {
-	struct fimd_context *ctx = get_fimd_context(dev);
-
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
 	/* TODO. */
@@ -121,8 +117,6 @@ static int fimd_check_timing(struct device *dev, void *timing)
 
 static int fimd_display_power_on(struct device *dev, int mode)
 {
-	struct fimd_context *ctx = get_fimd_context(dev);
-
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
 	/* TODO. */
@@ -499,7 +493,7 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc)
 
 	list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
 			base.link) {
-		/* if event's pipe isn't same as crtc then ignor it. */
+		/* if event's pipe isn't same as crtc then ignore it. */
 		if (crtc != e->pipe)
 			continue;
 
@@ -525,7 +519,6 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id)
 	struct fimd_context *ctx = (struct fimd_context *)dev_id;
 	struct exynos_drm_subdrv *subdrv = &ctx->subdrv;
 	struct drm_device *drm_dev = subdrv->drm_dev;
-	struct device *dev = subdrv->manager.dev;
 	struct exynos_drm_manager *manager = &subdrv->manager;
 	u32 val;
 
@@ -543,8 +536,6 @@ static irqreturn_t fimd_irq_handler(int irq, void *dev_id)
 
 static int fimd_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
 {
-	struct drm_driver *drm_driver = drm_dev->driver;
-
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
 	/*
@@ -569,8 +560,6 @@ static int fimd_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
 
 static void fimd_subdrv_remove(struct drm_device *drm_dev)
 {
-	struct drm_driver *drm_driver = drm_dev->driver;
-
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
 	/* TODO. */
Signature · 1 line
1.7.4.1