Skip to contentSkip to conversation

drm/exynos: fixed and cleanup ipp subsystem drivers

PATCH Superseded Eunchul Kim 2 participants 11 messages Dec 20, 2012

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover drm/exynos: fixed and cleanup ipp subsystem drivers

Hi All.

This patch set fixed some issue and cleanup code. please check my commit and let me know about your comment.

- This patch set fixes the following:
* fixed vflip, hflip case at the same time: we use vflip, hflip set at the same time for 180 degree supporting. so, we added this case.
* fixed warnning in GSC build: we don't use directly readl, but this code remained. so, we changed it.
* fixed unnormal interrupt in m2m operation : m2m operation called reset function at every time. but we don't disable dma start. so, we added dma stop and capture stop operation.

- And code clean like bellow:
* cleanup current command name : we use 'cmd' in property structure and so on.
so, this naming make some confusion. we changed 'cmd' to 'c_node' for avoid confusion.
* removed error handling about property : property could't be NULL. so, we removed error handling about NULL.
* cleanup comment of abbreviation : we changed comments for right grammar.
* cleanup needless parenthesis : we missed changing of fimc side. so, I added it.
* removed color bar pattern display : we don't use color display at writeback. so, removed it.

Thank's
BR
Eunchul Kim

Eunchul Kim (6):
drm/exynos: cleanup current command name. drm/exynos: removed needless error handling about property. drm/exynos: fixed vflip, hflip case at the same time. drm/exynos: fixed warnning in GSC build. drm/exynos: cleanup comment of abbreviation. drm/exynos: cleanup needless parenthesis.

Jinyoung Jeon (1):
drm/exynos: fixed unnormal interrupt in m2m operation.

JoongMock Shin (1):
drm/exynos: removed color bar pattern display.

 drivers/gpu/drm/exynos/exynos_drm_fimc.c    |   47 +++++++++++++--------------
 drivers/gpu/drm/exynos/exynos_drm_gsc.c     |   24 +++----------
 drivers/gpu/drm/exynos/exynos_drm_ipp.c     |   13 ++-----
 drivers/gpu/drm/exynos/exynos_drm_ipp.h     |    4 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |    3 +-
 5 files changed, 37 insertions(+), 54 deletions(-)
#1 lore raw

PATCH 1/8 drm/exynos: cleanup current command name.

This patch changed current command name from cmd to c_node. because we already use cmd for command control ioctl in another structure. so, this name make some confusion.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c    |    8 ++++----
 drivers/gpu/drm/exynos/exynos_drm_gsc.c     |    8 ++++----
 drivers/gpu/drm/exynos/exynos_drm_ipp.c     |    6 +++---
 drivers/gpu/drm/exynos/exynos_drm_ipp.h     |    4 ++--
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |    2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +4 -4
index 61ea242..7a3e460 100644
@@ -695,7 +695,7 @@ static int fimc_src_set_addr(struct device *dev,
 {
 	struct fimc_context *ctx = get_fimc_context(dev);
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_property *property;
 	struct drm_exynos_ipp_config *config;
 
@@ -1231,7 +1231,7 @@ static int fimc_dst_set_addr(struct device *dev,
 {
 	struct fimc_context *ctx = get_fimc_context(dev);
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_property *property;
 	struct drm_exynos_ipp_config *config;
 
@@ -1317,7 +1317,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
 {
 	struct fimc_context *ctx = dev_id;
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_event_work *event_work =
 		c_node->event_work;
 	int buf_id;
@@ -1557,7 +1557,7 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
 {
 	struct fimc_context *ctx = get_fimc_context(dev);
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_property *property;
 	struct drm_exynos_ipp_config *config;
 	struct drm_exynos_pos	img_pos[EXYNOS_DRM_OPS_MAX];
drivers/gpu/drm/exynos/exynos_drm_gsc.c +4 -4
index 5639353..c443c3b 100644
@@ -711,7 +711,7 @@ static int gsc_src_set_addr(struct device *dev,
 {
 	struct gsc_context *ctx = get_gsc_context(dev);
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_property *property;
 
 	if (!c_node) {
@@ -1171,7 +1171,7 @@ static int gsc_dst_set_addr(struct device *dev,
 {
 	struct gsc_context *ctx = get_gsc_context(dev);
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_property *property;
 
 	if (!c_node) {
@@ -1312,7 +1312,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
 {
 	struct gsc_context *ctx = dev_id;
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_event_work *event_work =
 		c_node->event_work;
 	u32 status;
@@ -1549,7 +1549,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
 {
 	struct gsc_context *ctx = get_gsc_context(dev);
 	struct exynos_drm_ippdrv *ippdrv = &ctx->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_property *property;
 	struct drm_exynos_ipp_config *config;
 	struct drm_exynos_pos	img_pos[EXYNOS_DRM_OPS_MAX];
drivers/gpu/drm/exynos/exynos_drm_ipp.c +3 -3
index 49eebe9..ba45f9a 100644
@@ -1292,7 +1292,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
 	DRM_DEBUG_KMS("%s:prop_id[%d]\n", __func__, property->prop_id);
 
 	/* store command info in ippdrv */
-	ippdrv->cmd = c_node;
+	ippdrv->c_node = c_node;
 
 	if (!ipp_check_mem_list(c_node)) {
 		DRM_DEBUG_KMS("%s:empty memory.\n", __func__);
@@ -1303,7 +1303,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
 	ret = ipp_set_property(ippdrv, property);
 	if (ret) {
 		DRM_ERROR("failed to set property.\n");
-		ippdrv->cmd = NULL;
+		ippdrv->c_node = NULL;
 		return ret;
 	}
 
@@ -1704,7 +1704,7 @@ void ipp_sched_event(struct work_struct *work)
 		return;
 	}
 
-	c_node = ippdrv->cmd;
+	c_node = ippdrv->c_node;
 	if (!c_node) {
 		DRM_ERROR("failed to get command node.\n");
 		return;
drivers/gpu/drm/exynos/exynos_drm_ipp.h +2 -2
index 28ffac9..5e5a0d6 100644
@@ -160,7 +160,7 @@ struct exynos_drm_ipp_ops {
  * @dedicated: dedicated ipp device.
  * @ops: source, destination operations.
  * @event_workq: event work queue.
- * @cmd: current command information.
+ * @c_node: current command information.
  * @cmd_list: list head for command information.
  * @prop_list: property informations of current ipp driver.
  * @check_property: check property about format, size, buffer.
@@ -178,7 +178,7 @@ struct exynos_drm_ippdrv {
 	bool	dedicated;
 	struct exynos_drm_ipp_ops	*ops[EXYNOS_DRM_OPS_MAX];
 	struct workqueue_struct	*event_workq;
-	struct drm_exynos_ipp_cmd_node *cmd;
+	struct drm_exynos_ipp_cmd_node *c_node;
 	struct list_head	cmd_list;
 	struct drm_exynos_ipp_prop_list *prop_list;
 
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -1
index 1c23660..17e4474 100644
@@ -139,7 +139,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
 {
 	struct rot_context *rot = arg;
 	struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv;
-	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->cmd;
+	struct drm_exynos_ipp_cmd_node *c_node = ippdrv->c_node;
 	struct drm_exynos_ipp_event_work *event_work = c_node->event_work;
 	enum rot_irq_status irq_status;
 	u32 val;
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/8 drm/exynos: removed needless error handling about property.

In reply to Eunchul Kim

This patch removed property error handling. property couldn't be NULL. so, I removed it.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c |   12 ------------
 drivers/gpu/drm/exynos/exynos_drm_gsc.c  |   12 ------------
 drivers/gpu/drm/exynos/exynos_drm_ipp.c  |    5 -----
 3 files changed, 0 insertions(+), 29 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +0 -12
index 7a3e460..5dc0251 100644
@@ -705,10 +705,6 @@ static int fimc_src_set_addr(struct device *dev,
 	}
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property.\n");
-		return -EINVAL;
-	}
 
 	DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
 		property->prop_id, buf_id, buf_type);
@@ -1241,10 +1237,6 @@ static int fimc_dst_set_addr(struct device *dev,
 	}
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property.\n");
-		return -EINVAL;
-	}
 
 	DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
 		property->prop_id, buf_id, buf_type);
@@ -1573,10 +1565,6 @@ static int fimc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
 	}
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property.\n");
-		return -EINVAL;
-	}
 
 	fimc_handle_irq(ctx, true, false, true);
 
drivers/gpu/drm/exynos/exynos_drm_gsc.c +0 -12
index c443c3b..ba5fefd 100644
@@ -720,10 +720,6 @@ static int gsc_src_set_addr(struct device *dev,
 	}
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property.\n");
-		return -EFAULT;
-	}
 
 	DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
 		property->prop_id, buf_id, buf_type);
@@ -1180,10 +1176,6 @@ static int gsc_dst_set_addr(struct device *dev,
 	}
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property.\n");
-		return -EFAULT;
-	}
 
 	DRM_DEBUG_KMS("%s:prop_id[%d]buf_id[%d]buf_type[%d]\n", __func__,
 		property->prop_id, buf_id, buf_type);
@@ -1565,10 +1557,6 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
 	}
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property.\n");
-		return -EINVAL;
-	}
 
 	gsc_handle_irq(ctx, true, false, true);
 
drivers/gpu/drm/exynos/exynos_drm_ipp.c +0 -5
index ba45f9a..cac94fe 100644
@@ -1487,11 +1487,6 @@ void ipp_sched_cmd(struct work_struct *work)
 	mutex_lock(&c_node->cmd_lock);
 
 	property = &c_node->property;
-	if (!property) {
-		DRM_ERROR("failed to get property:prop_id[%d]\n",
-			c_node->property.prop_id);
-		goto err_unlock;
-	}
 
 	switch (cmd_work->ctrl) {
 	case IPP_CTRL_PLAY:
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 3/8 drm/exynos: fixed vflip, hflip case at the same time.

In reply to Eunchul Kim

This patch fixed vflip, hflip at the same time. If we want to change 180 degree about buffer, then we can use h,vflip or 180 degree. we supports 180 degree using h,vflip. but we make error handling in this case. so, fixed it.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c    |    1 +
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +1 -0
index 5dc0251..4c4078c 100644
@@ -1387,6 +1387,7 @@ static inline bool fimc_check_drm_flip(enum drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:
 		return true;
 	default:
 		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -0
index 17e4474..09830ad 100644
@@ -513,6 +513,7 @@ static inline bool rotator_check_drm_flip(enum drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:
 		return true;
 	default:
 		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
Signature · 1 line
1.7.0.4
maintainer
#4 lore raw

RE: [PATCH 3/8] drm/exynos: fixed vflip, hflip case at the same time.

Quoted 30 lines

-----Original Message-----
From: Eunchul Kim [mailto:[email protected]]
Sent: Thursday, December 20, 2012 6:32 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH 3/8] drm/exynos: fixed vflip, hflip case at the same time.

This patch fixed vflip, hflip at the same time. If we want to change 180 degree about buffer,
then we can use h,vflip or 180 degree. we supports 180 degree using h,vflip.
but we make error handling in this case. so, fixed it.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c    |    1 +
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +0 -0
index 5dc0251..4c4078c 100644

drivers/gpu/drm/exynos/exynos_drm_fimc.c static inline bool fimc_check_drm_flip(enum · line 1391

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_fimc.c +1 -0
@@ -1387,6 +1387,7 @@ static inline bool fimc_check_drm_flip(enum
 drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:

This code induces build warning because the value of 'VERTICAL | HORIZONTAL' is out of range. Add a new enumeration value to enum drm_exynos_flip. i.e. EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL and use it.

Quoted 9 lines
drivers/gpu/drm/exynos/exynos_drm_fimc.c +0 -0
 		return true;
 	default:
drivers/gpu/drm/exynos/exynos_drm_fimc.c +0 -0
 		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
drivers/gpu/drm/exynos/exynos_drm_rotator.c +0 -0
index 17e4474..09830ad 100644

drivers/gpu/drm/exynos/exynos_drm_rotator.c static inline bool rotator_check_drm_flip(enum · line 517

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -0
@@ -513,6 +513,7 @@ static inline bool rotator_check_drm_flip(enum
 drm_exynos_flip flip)
 	case EXYNOS_DRM_FLIP_NONE:
 	case EXYNOS_DRM_FLIP_VERTICAL:
 	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:

Ditto.

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_rotator.c +0 -0
 		return true;
 	default:

DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
--
1.7.0.4

#5 lore raw

Re: [PATCH 3/8] drm/exynos: fixed vflip, hflip case at the same time.

Thank's for comment.

Oops, sorry that is my fault.
I will resend it.

BR
Eunchul Kim

Quoted 24 lines · Inki Dae
Quoted 24 lines

-----Original Message-----
From: Eunchul Kim [mailto:[email protected]]
Sent: Thursday, December 20, 2012 6:32 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH 3/8] drm/exynos: fixed vflip, hflip case at the same time.

This patch fixed vflip, hflip at the same time. If we want to change 180 degree about buffer,
then we can use h,vflip or 180 degree. we supports 180 degree using h,vflip.
but we make error handling in this case. so, fixed it.

---
  drivers/gpu/drm/exynos/exynos_drm_fimc.c    |    1 +
  drivers/gpu/drm/exynos/exynos_drm_rotator.c |    1 +
  2 files changed, 2 insertions(+), 0 deletions(-)
Quoted 16 lines

drivers/gpu/drm/exynos/exynos_drm_fimc.c static inline bool fimc_check_drm_flip(enum · line 1391

Quoted 11 lines
drivers/gpu/drm/exynos/exynos_drm_fimc.c +1 -0
index 5dc0251..4c4078c 100644
@@ -1387,6 +1387,7 @@ static inline bool fimc_check_drm_flip(enum
 drm_exynos_flip flip)
  	case EXYNOS_DRM_FLIP_NONE:
  	case EXYNOS_DRM_FLIP_VERTICAL:
  	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:

This code induces build warning because the value of 'VERTICAL | HORIZONTAL' is out of range. Add a new enumeration value to enum drm_exynos_flip. i.e. EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL and use it.

- thank's I guess why not occured warnning. but It's the better. I will resend it.

Quoted 25 lines
Quoted 10 lines
drivers/gpu/drm/exynos/exynos_drm_fimc.c +0 -0
  		return true;
  	default:
  		DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
drivers/gpu/drm/exynos/exynos_drm_rotator.c +0 -0
index 17e4474..09830ad 100644

drivers/gpu/drm/exynos/exynos_drm_rotator.c static inline bool rotator_check_drm_flip(enum · line 517

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -0
@@ -513,6 +513,7 @@ static inline bool rotator_check_drm_flip(enum
 drm_exynos_flip flip)
  	case EXYNOS_DRM_FLIP_NONE:
  	case EXYNOS_DRM_FLIP_VERTICAL:
  	case EXYNOS_DRM_FLIP_HORIZONTAL:
+	case EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL:

Ditto.

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_drm_rotator.c +0 -0
  		return true;
  	default:

DRM_DEBUG_KMS("%s:invalid flip\n", __func__);
--
1.7.0.4

#6 lore raw

PATCH 4/8 drm/exynos: fixed warnning in GSC build.

In reply to Eunchul Kim

This patch fixed warnning in GSC build.

---
 drivers/gpu/drm/exynos/exynos_drm_gsc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_gsc.c +1 -1
index ba5fefd..4546833 100644
@@ -1592,7 +1592,7 @@ static int gsc_ippdrv_start(struct device *dev, enum drm_exynos_ipp_cmd cmd)
 		exynos_drm_ippnb_send_event(IPP_SET_WRITEBACK, (void *)&set_wb);
 
 		/* src local path */
-		cfg = readl(GSC_IN_CON);
+		cfg = gsc_read(GSC_IN_CON);
 		cfg &= ~(GSC_IN_PATH_MASK | GSC_IN_LOCAL_SEL_MASK);
 		cfg |= (GSC_IN_PATH_LOCAL | GSC_IN_LOCAL_FIMD_WB);
 		gsc_write(cfg, GSC_IN_CON);
Signature · 1 line
1.7.0.4
#7 lore raw

PATCH 5/8 drm/exynos: cleanup comment of abbreviation.

In reply to Eunchul Kim

This patch cleanup comment of abbreviation.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c  |    2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +1 -1
index 4c4078c..cfeb606 100644
@@ -25,7 +25,7 @@
 #include "exynos_drm_fimc.h"
 
 /*
- * FIMC is stand for Fully Interactive Mobile Camera and
+ * FIMC stands for Fully Interactive Mobile Camera and
  * supports image scaler/rotator and input/output DMA operations.
  * input DMA reads image data from the memory.
  * output DMA writes image data to memory.
drivers/gpu/drm/exynos/exynos_drm_gsc.c +1 -1
index 4546833..89fdb49 100644
@@ -25,7 +25,7 @@
 #include "exynos_drm_gsc.h"
 
 /*
- * GSC is stand for General SCaler and
+ * GSC stands for General SCaler and
  * supports image scaler/rotator and input/output DMA operations.
  * input DMA reads image data from the memory.
  * output DMA writes image data to memory.
drivers/gpu/drm/exynos/exynos_drm_ipp.c +1 -1
index cac94fe..63bcf92 100644
@@ -27,7 +27,7 @@
 #include "exynos_drm_iommu.h"
 
 /*
- * IPP is stand for Image Post Processing and
+ * IPP stands for Image Post Processing and
  * supports image scaler/rotator and input/output DMA operations.
  * using FIMC, GSC, Rotator, so on.
  * IPP is integration device driver of same attribute h/w
Signature · 1 line
1.7.0.4
#8 lore raw

PATCH 6/8 drm/exynos: removed color bar pattern display.

In reply to Eunchul Kim

From: JoongMock Shin <[email protected]>

This patch removed color bar pattern register. we not use color bar any more. and don't support color bar at writeback operation.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +3 -6
index cfeb606..67e1b88 100644
@@ -163,17 +163,14 @@ struct fimc_context {
 	bool	suspended;
 };
 
-static void fimc_sw_reset(struct fimc_context *ctx, bool pattern)
+static void fimc_sw_reset(struct fimc_context *ctx)
 {
 	u32 cfg;
 
-	DRM_DEBUG_KMS("%s:pattern[%d]\n", __func__, pattern);
+	DRM_DEBUG_KMS("%s\n", __func__);
 
 	cfg = fimc_read(EXYNOS_CISRCFMT);
 	cfg |= EXYNOS_CISRCFMT_ITU601_8BIT;
-	if (pattern)
-		cfg |= EXYNOS_CIGCTRL_TESTPATTERN_COLOR_BAR;
-
 	fimc_write(cfg, EXYNOS_CISRCFMT);
 
 	/* s/w reset */
@@ -1536,7 +1533,7 @@ static int fimc_ippdrv_reset(struct device *dev)
 	DRM_DEBUG_KMS("%s\n", __func__);
 
 	/* reset h/w block */
-	fimc_sw_reset(ctx, false);
+	fimc_sw_reset(ctx);
 
 	/* reset scaler capability */
 	memset(&ctx->sc, 0x0, sizeof(ctx->sc));
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 7/8 drm/exynos: fixed unnormal interrupt in m2m operation.

In reply to Eunchul Kim

From: Jinyoung Jeon <[email protected]>

This patch fixed unnormal interrupt at m2m operation sometimes. m2m operation called s/w reset during every frame. but m2m occured interrupt after s/w reset sometimes. so, we cleared dma operation and capture operation.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +13 -0
index 67e1b88..c9eaa81 100644
@@ -169,10 +169,23 @@ static void fimc_sw_reset(struct fimc_context *ctx)
 
 	DRM_DEBUG_KMS("%s\n", __func__);
 
+	/* stop dma operation */
+	cfg = fimc_read(EXYNOS_CISTATUS);
+	if (EXYNOS_CISTATUS_GET_ENVID_STATUS(cfg)) {
+		cfg = fimc_read(EXYNOS_MSCTRL);
+		cfg &= ~EXYNOS_MSCTRL_ENVID;
+		fimc_write(cfg, EXYNOS_MSCTRL);
+	}
+
 	cfg = fimc_read(EXYNOS_CISRCFMT);
 	cfg |= EXYNOS_CISRCFMT_ITU601_8BIT;
 	fimc_write(cfg, EXYNOS_CISRCFMT);
 
+	/* disable image capture */
+	cfg = fimc_read(EXYNOS_CIIMGCPT);
+	cfg &= ~(EXYNOS_CIIMGCPT_IMGCPTEN_SC | EXYNOS_CIIMGCPT_IMGCPTEN);
+	fimc_write(cfg, EXYNOS_CIIMGCPT);
+
 	/* s/w reset */
 	cfg = fimc_read(EXYNOS_CIGCTRL);
 	cfg |= (EXYNOS_CIGCTRL_SWRST);
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 8/8 drm/exynos: cleanup needless parenthesis.

In reply to Eunchul Kim

This patch cleanup needless parenthesis. we got the comment from GSC. but we missed fimc side. so, we cleanup the code.

---
 drivers/gpu/drm/exynos/exynos_drm_fimc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +1 -1
index c9eaa81..7238f4e 100644
@@ -1212,7 +1212,7 @@ static int fimc_dst_set_buf_seq(struct fimc_context *ctx, u32 buf_id,
 	}
 
 	/* sequence id */
-	cfg &= (~mask);
+	cfg &= ~mask;
 	cfg |= (enable << buf_id);
 	fimc_write(cfg, EXYNOS_CIFCNTSEQ);
 
Signature · 1 line
1.7.0.4