All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433
@ 2016-02-03 12:42 Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Marek Szyprowski
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

Hello all,

This patch series is a set of various fixes to get Exynos DRM working on
Exynos 5433 SoCs and 64bit ARM64 architecture.

Patches are based on top of v4.5-rc2 release.

Best regards
Marek Szyprowski
Samsung R&D Institute Poland


Patch summary:

Joonyoung Shim (1):
  drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS

Marek Szyprowski (9):
  drm/exynos: ipp: fix incorrect format specifiers in debug messages
  drm/exynos: fix types for compilation on 64bit architectures
  drm/exynos: mic: use devm_clk interface
  drm/exynos: mic: convert to component framework
  drm/exynos: mic: make all functions static
  drm/exynos: dsi: restore support for drm bridge
  drm/exynos: initialize DMA ops for virtual Exynos DRM device
  drm/exynos: exynos5433_decon: fix wrong state assignment in
    decon_enable
  drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable

 drivers/gpu/drm/exynos/Kconfig                |  2 +-
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c |  4 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c       |  1 +
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       |  1 +
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |  5 +-
 drivers/gpu/drm/exynos/exynos_drm_gem.c       |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c       | 32 ++++++------
 drivers/gpu/drm/exynos/exynos_drm_mic.c       | 72 ++++++++++++++++-----------
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_vidi.c      |  8 +--
 12 files changed, 74 insertions(+), 59 deletions(-)

-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-11 11:17   ` Inki Dae
  2016-02-03 12:42 ` [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages Marek Szyprowski
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

From: Joonyoung Shim <jy0922.shim@samsung.com>

Because PLAT_SAMSUNG isn't include exynos SoCs for arm64, but
ARCH_EXYNOS can do it. And it also needs to add ARCH_S3C64XX instead of
PLAT_SAMSUNG.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig
index 83efca9..f17d392 100644
--- a/drivers/gpu/drm/exynos/Kconfig
+++ b/drivers/gpu/drm/exynos/Kconfig
@@ -1,6 +1,6 @@
 config DRM_EXYNOS
 	tristate "DRM Support for Samsung SoC EXYNOS Series"
-	depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM)
+	depends on OF && DRM && (ARCH_S3C64XX || ARCH_EXYNOS || ARCH_MULTIPLATFORM)
 	select DRM_KMS_HELPER
 	select DRM_KMS_FB_HELPER
 	select FB_CFB_FILLRECT
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-04  2:17   ` Krzysztof Kozlowski
  2016-02-03 12:42 ` [PATCH 03/10] drm/exynos: fix types for compilation on 64bit architectures Marek Szyprowski
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

Drivers should use %p for printing pointers instead of hardcoding them
as hexadecimal integers. This patch fixes compilation warnings on 64bit
architectures.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 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     | 32 ++++++++++++++---------------
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |  2 +-
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index c747824..8a4f4a0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1723,7 +1723,7 @@ static int fimc_probe(struct platform_device *pdev)
 		goto err_put_clk;
 	}
 
-	DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
+	DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv);
 
 	spin_lock_init(&ctx->lock);
 	platform_set_drvdata(pdev, ctx);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 7aecd23..5d20da8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1723,7 +1723,7 @@ static int gsc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
+	DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv);
 
 	mutex_init(&ctx->lock);
 	platform_set_drvdata(pdev, ctx);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 67d2423..95eeb91 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -208,7 +208,7 @@ static struct exynos_drm_ippdrv *ipp_find_drv_by_handle(u32 prop_id)
 	 * e.g PAUSE state, queue buf, command control.
 	 */
 	list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
-		DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n", count++, (int)ippdrv);
+		DRM_DEBUG_KMS("count[%d]ippdrv[%p]\n", count++, ippdrv);
 
 		mutex_lock(&ippdrv->cmd_lock);
 		list_for_each_entry(c_node, &ippdrv->cmd_list, list) {
@@ -388,8 +388,8 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
 	}
 	property->prop_id = ret;
 
-	DRM_DEBUG_KMS("created prop_id[%d]cmd[%d]ippdrv[0x%x]\n",
-		property->prop_id, property->cmd, (int)ippdrv);
+	DRM_DEBUG_KMS("created prop_id[%d]cmd[%d]ippdrv[%p]\n",
+		property->prop_id, property->cmd, ippdrv);
 
 	/* stored property information and ippdrv in private data */
 	c_node->property = *property;
@@ -518,7 +518,7 @@ static int ipp_put_mem_node(struct drm_device *drm_dev,
 {
 	int i;
 
-	DRM_DEBUG_KMS("node[0x%x]\n", (int)m_node);
+	DRM_DEBUG_KMS("node[%p]\n", m_node);
 
 	if (!m_node) {
 		DRM_ERROR("invalid dequeue node.\n");
@@ -562,7 +562,7 @@ static struct drm_exynos_ipp_mem_node
 	m_node->buf_id = qbuf->buf_id;
 	INIT_LIST_HEAD(&m_node->list);
 
-	DRM_DEBUG_KMS("m_node[0x%x]ops_id[%d]\n", (int)m_node, qbuf->ops_id);
+	DRM_DEBUG_KMS("m_node[%p]ops_id[%d]\n", m_node, qbuf->ops_id);
 	DRM_DEBUG_KMS("prop_id[%d]buf_id[%d]\n", qbuf->prop_id, m_node->buf_id);
 
 	for_each_ipp_planar(i) {
@@ -582,8 +582,8 @@ static struct drm_exynos_ipp_mem_node
 
 			buf_info->handles[i] = qbuf->handle[i];
 			buf_info->base[i] = *addr;
-			DRM_DEBUG_KMS("i[%d]base[0x%x]hd[0x%lx]\n", i,
-				      buf_info->base[i], buf_info->handles[i]);
+			DRM_DEBUG_KMS("i[%d]base[%pad]hd[0x%lx]\n", i,
+				      &buf_info->base[i], buf_info->handles[i]);
 		}
 	}
 
@@ -664,7 +664,7 @@ static void ipp_put_event(struct drm_exynos_ipp_cmd_node *c_node,
 
 	mutex_lock(&c_node->event_lock);
 	list_for_each_entry_safe(e, te, &c_node->event_list, base.link) {
-		DRM_DEBUG_KMS("count[%d]e[0x%x]\n", count++, (int)e);
+		DRM_DEBUG_KMS("count[%d]e[%p]\n", count++, e);
 
 		/*
 		 * qbuf == NULL condition means all event deletion.
@@ -755,7 +755,7 @@ static struct drm_exynos_ipp_mem_node
 
 	/* find memory node from memory list */
 	list_for_each_entry(m_node, head, list) {
-		DRM_DEBUG_KMS("count[%d]m_node[0x%x]\n", count++, (int)m_node);
+		DRM_DEBUG_KMS("count[%d]m_node[%p]\n", count++, m_node);
 
 		/* compare buffer id */
 		if (m_node->buf_id == qbuf->buf_id)
@@ -772,7 +772,7 @@ static int ipp_set_mem_node(struct exynos_drm_ippdrv *ippdrv,
 	struct exynos_drm_ipp_ops *ops = NULL;
 	int ret = 0;
 
-	DRM_DEBUG_KMS("node[0x%x]\n", (int)m_node);
+	DRM_DEBUG_KMS("node[%p]\n", m_node);
 
 	if (!m_node) {
 		DRM_ERROR("invalid queue node.\n");
@@ -1237,7 +1237,7 @@ static int ipp_start_property(struct exynos_drm_ippdrv *ippdrv,
 			m_node = list_first_entry(head,
 				struct drm_exynos_ipp_mem_node, list);
 
-			DRM_DEBUG_KMS("m_node[0x%x]\n", (int)m_node);
+			DRM_DEBUG_KMS("m_node[%p]\n", m_node);
 
 			ret = ipp_set_mem_node(ippdrv, c_node, m_node);
 			if (ret) {
@@ -1610,8 +1610,8 @@ static int ipp_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
 		}
 		ippdrv->prop_list.ipp_id = ret;
 
-		DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]ipp_id[%d]\n",
-			count++, (int)ippdrv, ret);
+		DRM_DEBUG_KMS("count[%d]ippdrv[%p]ipp_id[%d]\n",
+			count++, ippdrv, ret);
 
 		/* store parent device for node */
 		ippdrv->parent_dev = dev;
@@ -1668,7 +1668,7 @@ static int ipp_subdrv_open(struct drm_device *drm_dev, struct device *dev,
 
 	file_priv->ipp_dev = dev;
 
-	DRM_DEBUG_KMS("done priv[0x%x]\n", (int)dev);
+	DRM_DEBUG_KMS("done priv[%p]\n", dev);
 
 	return 0;
 }
@@ -1685,8 +1685,8 @@ static void ipp_subdrv_close(struct drm_device *drm_dev, struct device *dev,
 		mutex_lock(&ippdrv->cmd_lock);
 		list_for_each_entry_safe(c_node, tc_node,
 			&ippdrv->cmd_list, list) {
-			DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n",
-				count++, (int)ippdrv);
+			DRM_DEBUG_KMS("count[%d]ippdrv[%p]\n",
+				count++, ippdrv);
 
 			if (c_node->filp == file) {
 				/*
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index bea0f78..ce59f44 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -754,7 +754,7 @@ static int rotator_probe(struct platform_device *pdev)
 		goto err_ippdrv_register;
 	}
 
-	DRM_DEBUG_KMS("ippdrv[0x%x]\n", (int)ippdrv);
+	DRM_DEBUG_KMS("ippdrv[%p]\n", ippdrv);
 
 	platform_set_drvdata(pdev, rot);
 
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 03/10] drm/exynos: fix types for compilation on 64bit architectures
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 04/10] drm/exynos: mic: use devm_clk interface Marek Szyprowski
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

This patch fixes compilation warnings (on 64bit architectures) and bugs
related to casting pointers through 32bit integers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c  | 5 +++--
 drivers/gpu/drm/exynos/exynos_drm_gem.c  | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 +++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index c17efdb..8dfe6e1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -1166,7 +1166,7 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
 		goto err_free_event;
 	}
 
-	cmd = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd;
+	cmd = (struct drm_exynos_g2d_cmd *)(unsigned long)req->cmd;
 
 	if (copy_from_user(cmdlist->data + cmdlist->last,
 				(void __user *)cmd,
@@ -1184,7 +1184,8 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
 	if (req->cmd_buf_nr) {
 		struct drm_exynos_g2d_cmd *cmd_buf;
 
-		cmd_buf = (struct drm_exynos_g2d_cmd *)(uint32_t)req->cmd_buf;
+		cmd_buf = (struct drm_exynos_g2d_cmd *)
+				(unsigned long)req->cmd_buf;
 
 		if (copy_from_user(cmdlist->data + cmdlist->last,
 					(void __user *)cmd_buf,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index 32358c5..47d126a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -218,7 +218,7 @@ static struct exynos_drm_gem *exynos_drm_gem_init(struct drm_device *dev,
 		return ERR_PTR(ret);
 	}
 
-	DRM_DEBUG_KMS("created file object = 0x%x\n", (unsigned int)obj->filp);
+	DRM_DEBUG_KMS("created file object = %p\n", obj->filp);
 
 	return exynos_gem;
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 62ac4e5..b605bd7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -223,7 +223,7 @@ static void vidi_fake_vblank_handler(struct work_struct *work)
 	}
 }
 
-static int vidi_show_connection(struct device *dev,
+static ssize_t vidi_show_connection(struct device *dev,
 				struct device_attribute *attr, char *buf)
 {
 	struct vidi_context *ctx = dev_get_drvdata(dev);
@@ -238,7 +238,7 @@ static int vidi_show_connection(struct device *dev,
 	return rc;
 }
 
-static int vidi_store_connection(struct device *dev,
+static ssize_t vidi_store_connection(struct device *dev,
 				struct device_attribute *attr,
 				const char *buf, size_t len)
 {
@@ -294,7 +294,9 @@ int vidi_connection_ioctl(struct drm_device *drm_dev, void *data,
 	}
 
 	if (vidi->connection) {
-		struct edid *raw_edid  = (struct edid *)(uint32_t)vidi->edid;
+		struct edid *raw_edid;
+
+		raw_edid = (struct edid *)(unsigned long)vidi->edid;
 		if (!drm_edid_is_valid(raw_edid)) {
 			DRM_DEBUG_KMS("edid data is invalid.\n");
 			return -EINVAL;
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 04/10] drm/exynos: mic: use devm_clk interface
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (2 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 03/10] drm/exynos: fix types for compilation on 64bit architectures Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 05/10] drm/exynos: mic: convert to component framework Marek Szyprowski
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

Drivers should use devm_clk* interface instead of of_clk* functions.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index 4eaef36..10594c1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -445,7 +445,7 @@ int exynos_mic_probe(struct platform_device *pdev)
 	}
 
 	for (i = 0; i < NUM_CLKS; i++) {
-		mic->clks[i] = of_clk_get_by_name(dev->of_node, clk_names[i]);
+		mic->clks[i] = devm_clk_get(dev, clk_names[i]);
 		if (IS_ERR(mic->clks[i])) {
 			DRM_ERROR("mic: Failed to get clock (%s)\n",
 								clk_names[i]);
@@ -463,13 +463,9 @@ err:
 static int exynos_mic_remove(struct platform_device *pdev)
 {
 	struct exynos_mic *mic = platform_get_drvdata(pdev);
-	int i;
 
 	drm_bridge_remove(&mic->bridge);
 
-	for (i = NUM_CLKS - 1; i > -1; i--)
-		clk_put(mic->clks[i]);
-
 	return 0;
 }
 
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 05/10] drm/exynos: mic: convert to component framework
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (3 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 04/10] drm/exynos: mic: use devm_clk interface Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 06/10] drm/exynos: mic: make all functions static Marek Szyprowski
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

MIC is SoC component and important part of kms pipeline on Exynos5433,
so convert it to use component framework like other KMS/CRTC drivers.
MIC driver is already listed on KMS component driver list in Exynos DRM
core, so without this conversion, initialization of Exynos DRM core
fails on Exynos 5433 SoC.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_mic.c | 56 +++++++++++++++++++++------------
 1 file changed, 36 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index 10594c1..899061a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -18,6 +18,7 @@
 #include <linux/of.h>
 #include <linux/of_graph.h>
 #include <linux/clk.h>
+#include <linux/component.h>
 #include <drm/drmP.h>
 #include <linux/mfd/syscon.h>
 #include <linux/regmap.h>
@@ -373,9 +374,33 @@ already_enabled:
 
 void mic_enable(struct drm_bridge *bridge) { }
 
-void mic_destroy(struct drm_bridge *bridge)
+static const struct drm_bridge_funcs mic_bridge_funcs = {
+	.disable = mic_disable,
+	.post_disable = mic_post_disable,
+	.pre_enable = mic_pre_enable,
+	.enable = mic_enable,
+};
+
+static int exynos_mic_bind(struct device *dev, struct device *master,
+			   void *data)
 {
-	struct exynos_mic *mic = bridge->driver_private;
+	struct exynos_mic *mic = dev_get_drvdata(dev);
+	int ret;
+
+	mic->bridge.funcs = &mic_bridge_funcs;
+	mic->bridge.of_node = dev->of_node;
+	mic->bridge.driver_private = mic;
+	ret = drm_bridge_add(&mic->bridge);
+	if (ret)
+		DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
+
+	return ret;
+}
+
+static void exynos_mic_unbind(struct device *dev, struct device *master,
+			      void *data)
+{
+	struct exynos_mic *mic = dev_get_drvdata(dev);
 	int i;
 
 	mutex_lock(&mic_mutex);
@@ -387,13 +412,13 @@ void mic_destroy(struct drm_bridge *bridge)
 
 already_disabled:
 	mutex_unlock(&mic_mutex);
+
+	drm_bridge_remove(&mic->bridge);
 }
 
-static const struct drm_bridge_funcs mic_bridge_funcs = {
-	.disable = mic_disable,
-	.post_disable = mic_post_disable,
-	.pre_enable = mic_pre_enable,
-	.enable = mic_enable,
+static const struct component_ops exynos_mic_component_ops = {
+	.bind	= exynos_mic_bind,
+	.unbind	= exynos_mic_unbind,
 };
 
 int exynos_mic_probe(struct platform_device *pdev)
@@ -435,15 +460,6 @@ int exynos_mic_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	mic->bridge.funcs = &mic_bridge_funcs;
-	mic->bridge.of_node = dev->of_node;
-	mic->bridge.driver_private = mic;
-	ret = drm_bridge_add(&mic->bridge);
-	if (ret) {
-		DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
-		goto err;
-	}
-
 	for (i = 0; i < NUM_CLKS; i++) {
 		mic->clks[i] = devm_clk_get(dev, clk_names[i]);
 		if (IS_ERR(mic->clks[i])) {
@@ -454,7 +470,10 @@ int exynos_mic_probe(struct platform_device *pdev)
 		}
 	}
 
+	platform_set_drvdata(pdev, mic);
+
 	DRM_DEBUG_KMS("MIC has been probed\n");
+	return component_add(dev, &exynos_mic_component_ops);
 
 err:
 	return ret;
@@ -462,10 +481,7 @@ err:
 
 static int exynos_mic_remove(struct platform_device *pdev)
 {
-	struct exynos_mic *mic = platform_get_drvdata(pdev);
-
-	drm_bridge_remove(&mic->bridge);
-
+	component_del(&pdev->dev, &exynos_mic_component_ops);
 	return 0;
 }
 
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 06/10] drm/exynos: mic: make all functions static
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (4 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 05/10] drm/exynos: mic: convert to component framework Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 07/10] drm/exynos: dsi: restore support for drm bridge Marek Szyprowski
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

There is no point exposing all internal functions to global kernel name
space, so make all internals functions static.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_mic.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
index 899061a..9869d70 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
@@ -307,9 +307,9 @@ exit:
 	return ret;
 }
 
-void mic_disable(struct drm_bridge *bridge) { }
+static void mic_disable(struct drm_bridge *bridge) { }
 
-void mic_post_disable(struct drm_bridge *bridge)
+static void mic_post_disable(struct drm_bridge *bridge)
 {
 	struct exynos_mic *mic = bridge->driver_private;
 	int i;
@@ -329,7 +329,7 @@ already_disabled:
 	mutex_unlock(&mic_mutex);
 }
 
-void mic_pre_enable(struct drm_bridge *bridge)
+static void mic_pre_enable(struct drm_bridge *bridge)
 {
 	struct exynos_mic *mic = bridge->driver_private;
 	int ret, i;
@@ -372,7 +372,7 @@ already_enabled:
 	mutex_unlock(&mic_mutex);
 }
 
-void mic_enable(struct drm_bridge *bridge) { }
+static void mic_enable(struct drm_bridge *bridge) { }
 
 static const struct drm_bridge_funcs mic_bridge_funcs = {
 	.disable = mic_disable,
@@ -421,7 +421,7 @@ static const struct component_ops exynos_mic_component_ops = {
 	.unbind	= exynos_mic_unbind,
 };
 
-int exynos_mic_probe(struct platform_device *pdev)
+static int exynos_mic_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct exynos_mic *mic;
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 07/10] drm/exynos: dsi: restore support for drm bridge
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (5 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 06/10] drm/exynos: mic: make all functions static Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device Marek Szyprowski
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Marek Szyprowski, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Andrzej Hajda, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz

This patch fixes issue introduced by commit
cf67cc9a29ac19c98bc4fa0e6d14b0c1f592d322 ("drm/exynos: remove struct
exynos_drm_display"), which removed assigning of drm bridge to drm
encoder. Lack of it caused that no bridge callbacks were called on
encoder enable/disable actions.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index d84a498..5941650 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1782,6 +1782,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
 
 	bridge = of_drm_find_bridge(dsi->bridge_node);
 	if (bridge) {
+		encoder->bridge = bridge;
 		drm_bridge_attach(drm_dev, bridge);
 	}
 
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (6 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 07/10] drm/exynos: dsi: restore support for drm bridge Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-12  5:55   ` Inki Dae
  2016-02-03 12:42 ` [PATCH 09/10] drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable Marek Szyprowski
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Seung-Woo Kim,
	Andrzej Hajda, Marek Szyprowski

Virtual DRM device is used for memory allocation for GEM objects. On
some architectures null dma operations are assigned for virtual devices
if no explicit initialization has been made.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 68f0f36..a33ea44 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -144,6 +144,7 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
 	init_waitqueue_head(&private->wait);
 	spin_lock_init(&private->lock);
 
+	arch_setup_dma_ops(dev->dev, 0, DMA_BIT_MASK(32), false, false);
 	dev_set_drvdata(dev->dev, dev);
 	dev->dev_private = (void *)private;
 
-- 
1.9.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 09/10] drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (7 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-03 12:42 ` [PATCH 10/10] drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable Marek Szyprowski
  2016-02-08 11:14 ` [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Emil Velikov
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Marek Szyprowski, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Andrzej Hajda, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz

Patch ebf3fd403b79ba6561bd1a4bb5a7cacc99da08e5 ("drm/exynos: add
pm_runtime to DECON 5433") removed some code from decon_enable()
function, but it left set_bit(BIT_SUSPENDED, &ctx->flags) call, which
was earlier called only in error path. This patch removes it, what
finally lets driver to go out of suspended state.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 1bf6a21..c793316 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -402,8 +402,6 @@ static void decon_enable(struct exynos_drm_crtc *crtc)
 		decon_enable_vblank(ctx->crtc);
 
 	decon_commit(ctx->crtc);
-
-	set_bit(BIT_SUSPENDED, &ctx->flags);
 }
 
 static void decon_disable(struct exynos_drm_crtc *crtc)
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 10/10] drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (8 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 09/10] drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable Marek Szyprowski
@ 2016-02-03 12:42 ` Marek Szyprowski
  2016-02-08 11:14 ` [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Emil Velikov
  10 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-03 12:42 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc
  Cc: Marek Szyprowski, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Andrzej Hajda, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz

BIT_IRQS_ENABLED was never set because of incorrect test in
decon_vlank_enable() function, what resulted in lack of enabling vblank
support. This patch fixes this issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index c793316..107224a 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -93,7 +93,7 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
 	if (test_bit(BIT_SUSPENDED, &ctx->flags))
 		return -EPERM;
 
-	if (test_and_set_bit(BIT_IRQS_ENABLED, &ctx->flags)) {
+	if (!test_and_set_bit(BIT_IRQS_ENABLED, &ctx->flags)) {
 		val = VIDINTCON0_INTEN;
 		if (ctx->out_type == IFTYPE_I80)
 			val |= VIDINTCON0_FRAMEDONE;
-- 
1.9.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages
  2016-02-03 12:42 ` [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages Marek Szyprowski
@ 2016-02-04  2:17   ` Krzysztof Kozlowski
  2016-02-04  2:34     ` Inki Dae
  0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2016-02-04  2:17 UTC (permalink / raw)
  To: Marek Szyprowski, dri-devel, linux-samsung-soc
  Cc: Inki Dae, Joonyoung Shim, Seung-Woo Kim, Andrzej Hajda,
	Bartlomiej Zolnierkiewicz

On 03.02.2016 21:42, Marek Szyprowski wrote:
> Drivers should use %p for printing pointers instead of hardcoding them
> as hexadecimal integers. This patch fixes compilation warnings on 64bit
> architectures.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  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     | 32 ++++++++++++++---------------
>  drivers/gpu/drm/exynos/exynos_drm_rotator.c |  2 +-
>  4 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> index c747824..8a4f4a0 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
> @@ -1723,7 +1723,7 @@ static int fimc_probe(struct platform_device *pdev)
>  		goto err_put_clk;
>  	}
>  
> -	DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
> +	DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv);

I don't oppose the patch itself but I have different concern. First -
probably you meant %pK because this is a writeable structure with
function pointers.
Second - why the ippdrv has to be printed? Is it useful for debugging?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages
  2016-02-04  2:17   ` Krzysztof Kozlowski
@ 2016-02-04  2:34     ` Inki Dae
  2016-02-04  2:45       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 19+ messages in thread
From: Inki Dae @ 2016-02-04  2:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Marek Szyprowski, dri-devel, linux-samsung-soc
  Cc: Andrzej Hajda, Seung-Woo Kim, Bartlomiej Zolnierkiewicz



2016년 02월 04일 11:17에 Krzysztof Kozlowski 이(가) 쓴 글:
> On 03.02.2016 21:42, Marek Szyprowski wrote:
>> Drivers should use %p for printing pointers instead of hardcoding them
>> as hexadecimal integers. This patch fixes compilation warnings on 64bit
>> architectures.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>  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     | 32 ++++++++++++++---------------
>>  drivers/gpu/drm/exynos/exynos_drm_rotator.c |  2 +-
>>  4 files changed, 19 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
>> index c747824..8a4f4a0 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
>> @@ -1723,7 +1723,7 @@ static int fimc_probe(struct platform_device *pdev)
>>  		goto err_put_clk;
>>  	}
>>  
>> -	DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
>> +	DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv);
> 
> I don't oppose the patch itself but I have different concern. First -
> probably you meant %pK because this is a writeable structure with
> function pointers.
> Second - why the ippdrv has to be printed? Is it useful for debugging?

Marek fixed just compilation warnings on ARM64 so yes it wouldn't need to print out ippdrv address but as other cleanup patch.

Thanks,
Inki Dae

> 
> Best regards,
> Krzysztof
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages
  2016-02-04  2:34     ` Inki Dae
@ 2016-02-04  2:45       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2016-02-04  2:45 UTC (permalink / raw)
  To: Inki Dae, Marek Szyprowski, dri-devel, linux-samsung-soc
  Cc: Joonyoung Shim, Seung-Woo Kim, Andrzej Hajda, Bartlomiej Zolnierkiewicz

On 04.02.2016 11:34, Inki Dae wrote:
> 
> 
> 2016년 02월 04일 11:17에 Krzysztof Kozlowski 이(가) 쓴 글:
>> On 03.02.2016 21:42, Marek Szyprowski wrote:
>>> Drivers should use %p for printing pointers instead of hardcoding them
>>> as hexadecimal integers. This patch fixes compilation warnings on 64bit
>>> architectures.
>>>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> ---
>>>  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     | 32 ++++++++++++++---------------
>>>  drivers/gpu/drm/exynos/exynos_drm_rotator.c |  2 +-
>>>  4 files changed, 19 insertions(+), 19 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
>>> index c747824..8a4f4a0 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
>>> @@ -1723,7 +1723,7 @@ static int fimc_probe(struct platform_device *pdev)
>>>  		goto err_put_clk;
>>>  	}
>>>  
>>> -	DRM_DEBUG_KMS("id[%d]ippdrv[0x%x]\n", ctx->id, (int)ippdrv);
>>> +	DRM_DEBUG_KMS("id[%d]ippdrv[%p]\n", ctx->id, ippdrv);
>>
>> I don't oppose the patch itself but I have different concern. First -
>> probably you meant %pK because this is a writeable structure with
>> function pointers.
>> Second - why the ippdrv has to be printed? Is it useful for debugging?
> 
> Marek fixed just compilation warnings on ARM64 so yes it wouldn't need to print out ippdrv address but as other cleanup patch.

Another patch?

There is no point in a flow like this:
1. Make a patch which changes %x to %p.
2. Make a second patch right after the first one which changes %p to %pK.
3. Optionally make a third patch removing %pK entirely.

There are two issues here (and in other places like in patch 3/10) -
64bit compilation warnings and security related issues. Properly fixing
security related issues would fix in the same time the compilation
warnings...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433
  2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
                   ` (9 preceding siblings ...)
  2016-02-03 12:42 ` [PATCH 10/10] drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable Marek Szyprowski
@ 2016-02-08 11:14 ` Emil Velikov
  2016-02-12  9:19   ` Andrzej Hajda
  10 siblings, 1 reply; 19+ messages in thread
From: Emil Velikov @ 2016-02-08 11:14 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Krzysztof Kozlowski, moderated list:ARM/S5P EXYNOS AR...,
	Bartlomiej Zolnierkiewicz, Seung-Woo Kim, ML dri-devel,
	Andrzej Hajda

Hi Marek,

On 3 February 2016 at 12:42, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
> Hello all,
>
> This patch series is a set of various fixes to get Exynos DRM working on
> Exynos 5433 SoCs and 64bit ARM64 architecture.
>
As you mentioned "64bit Exynos" devices, I'm wondering if you'll have
some input on the current exynos drm ABI as mentioned here [1]. I.e.
it feels broken when using 32bit userspace on 64 bit kernel due to the
use of unsigned int and alike types. Should we replace them (fix
things) with explicitly sized ones - _u32/64.

Does that sound reasonable, is anyone from the Exynos team interested
in sorting it out ?

Regards,
Emil

[1] https://lists.freedesktop.org/archives/dri-devel/2016-January/099547.html
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS
  2016-02-03 12:42 ` [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Marek Szyprowski
@ 2016-02-11 11:17   ` Inki Dae
  0 siblings, 0 replies; 19+ messages in thread
From: Inki Dae @ 2016-02-11 11:17 UTC (permalink / raw)
  To: Marek Szyprowski, dri-devel, linux-samsung-soc
  Cc: Joonyoung Shim, Seung-Woo Kim, Andrzej Hajda,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz


Hi Marek,

For all patches, picked them up.

Thanks,
Inki Dae

2016년 02월 03일 21:42에 Marek Szyprowski 이(가) 쓴 글:
> From: Joonyoung Shim <jy0922.shim@samsung.com>
> 
> Because PLAT_SAMSUNG isn't include exynos SoCs for arm64, but
> ARCH_EXYNOS can do it. And it also needs to add ARCH_S3C64XX instead of
> PLAT_SAMSUNG.
> 
> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/gpu/drm/exynos/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig
> index 83efca9..f17d392 100644
> --- a/drivers/gpu/drm/exynos/Kconfig
> +++ b/drivers/gpu/drm/exynos/Kconfig
> @@ -1,6 +1,6 @@
>  config DRM_EXYNOS
>  	tristate "DRM Support for Samsung SoC EXYNOS Series"
> -	depends on OF && DRM && (PLAT_SAMSUNG || ARCH_MULTIPLATFORM)
> +	depends on OF && DRM && (ARCH_S3C64XX || ARCH_EXYNOS || ARCH_MULTIPLATFORM)
>  	select DRM_KMS_HELPER
>  	select DRM_KMS_FB_HELPER
>  	select FB_CFB_FILLRECT
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device
  2016-02-03 12:42 ` [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device Marek Szyprowski
@ 2016-02-12  5:55   ` Inki Dae
  2016-02-12  8:44     ` Marek Szyprowski
  0 siblings, 1 reply; 19+ messages in thread
From: Inki Dae @ 2016-02-12  5:55 UTC (permalink / raw)
  To: Marek Szyprowski, dri-devel, linux-samsung-soc
  Cc: Joonyoung Shim, Seung-Woo Kim, Andrzej Hajda,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz

Hi Marek,

2016년 02월 03일 21:42에 Marek Szyprowski 이(가) 쓴 글:
> Virtual DRM device is used for memory allocation for GEM objects. On
> some architectures null dma operations are assigned for virtual devices
> if no explicit initialization has been made.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index 68f0f36..a33ea44 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -144,6 +144,7 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
>  	init_waitqueue_head(&private->wait);
>  	spin_lock_init(&private->lock);
>  
> +	arch_setup_dma_ops(dev->dev, 0, DMA_BIT_MASK(32), false, false);

As you got the report, above function incurrs build error below,
ERROR: "arch_setup_dma_ops" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined!

Exynos drm can be built as a module. In this case, arch_setup_dma_ops cannot be accessed by the module.

I could fix it easily like below but I'm not sure that it's reasonable.

+extern void arch_setup_dma_ops(struct device *dev, u64 dma_base,
+                                     u64 size, struct iommu_ops *iommu,
+                                     bool coherent) { };

Thanks,
Inki Dae

>  	dev_set_drvdata(dev->dev, dev);
>  	dev->dev_private = (void *)private;
>  
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device
  2016-02-12  5:55   ` Inki Dae
@ 2016-02-12  8:44     ` Marek Szyprowski
  0 siblings, 0 replies; 19+ messages in thread
From: Marek Szyprowski @ 2016-02-12  8:44 UTC (permalink / raw)
  To: Inki Dae, dri-devel, linux-samsung-soc
  Cc: Joonyoung Shim, Seung-Woo Kim, Andrzej Hajda,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz

Hello,

On 2016-02-12 06:55, Inki Dae wrote:
> Hi Marek,
>
> 2016년 02월 03일 21:42에 Marek Szyprowski 이(가) 쓴 글:
>> Virtual DRM device is used for memory allocation for GEM objects. On
>> some architectures null dma operations are assigned for virtual devices
>> if no explicit initialization has been made.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>   drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> index 68f0f36..a33ea44 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
>> @@ -144,6 +144,7 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)
>>   	init_waitqueue_head(&private->wait);
>>   	spin_lock_init(&private->lock);
>>   
>> +	arch_setup_dma_ops(dev->dev, 0, DMA_BIT_MASK(32), false, false);
> As you got the report, above function incurrs build error below,
> ERROR: "arch_setup_dma_ops" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined!
>
> Exynos drm can be built as a module. In this case, arch_setup_dma_ops cannot be accessed by the module.
>
> I could fix it easily like below but I'm not sure that it's reasonable.
>
> +extern void arch_setup_dma_ops(struct device *dev, u64 dma_base,
> +                                     u64 size, struct iommu_ops *iommu,
> +                                     bool coherent) { };

I don't think this is a good idea - the result will be same as not applying
the patch at all. Please drop this patch for now, I will rework it while
adding support for generic IOMMU for ARM and ARM64.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433
  2016-02-08 11:14 ` [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Emil Velikov
@ 2016-02-12  9:19   ` Andrzej Hajda
  0 siblings, 0 replies; 19+ messages in thread
From: Andrzej Hajda @ 2016-02-12  9:19 UTC (permalink / raw)
  To: Emil Velikov, Marek Szyprowski
  Cc: Krzysztof Kozlowski, moderated list:ARM/S5P EXYNOS AR...,
	Seung-Woo Kim, ML dri-devel, Bartlomiej Zolnierkiewicz

Hi Emil,


On 02/08/2016 12:14 PM, Emil Velikov wrote:
> Hi Marek,
> 
> On 3 February 2016 at 12:42, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>> Hello all,
>>
>> This patch series is a set of various fixes to get Exynos DRM working on
>> Exynos 5433 SoCs and 64bit ARM64 architecture.
>>
> As you mentioned "64bit Exynos" devices, I'm wondering if you'll have
> some input on the current exynos drm ABI as mentioned here [1]. I.e.
> it feels broken when using 32bit userspace on 64 bit kernel due to the
> use of unsigned int and alike types. Should we replace them (fix
> things) with explicitly sized ones - _u32/64.
> 
> Does that sound reasonable, is anyone from the Exynos team interested
> in sorting it out ?

I will take care of it.
Thanks of pointing it out.

Regards
Andrzej

> 
> Regards,
> Emil
> 
> [1] https://lists.freedesktop.org/archives/dri-devel/2016-January/099547.html
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-02-12  9:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 12:42 [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Marek Szyprowski
2016-02-03 12:42 ` [PATCH 01/10] drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS Marek Szyprowski
2016-02-11 11:17   ` Inki Dae
2016-02-03 12:42 ` [PATCH 02/10] drm/exynos: ipp: fix incorrect format specifiers in debug messages Marek Szyprowski
2016-02-04  2:17   ` Krzysztof Kozlowski
2016-02-04  2:34     ` Inki Dae
2016-02-04  2:45       ` Krzysztof Kozlowski
2016-02-03 12:42 ` [PATCH 03/10] drm/exynos: fix types for compilation on 64bit architectures Marek Szyprowski
2016-02-03 12:42 ` [PATCH 04/10] drm/exynos: mic: use devm_clk interface Marek Szyprowski
2016-02-03 12:42 ` [PATCH 05/10] drm/exynos: mic: convert to component framework Marek Szyprowski
2016-02-03 12:42 ` [PATCH 06/10] drm/exynos: mic: make all functions static Marek Szyprowski
2016-02-03 12:42 ` [PATCH 07/10] drm/exynos: dsi: restore support for drm bridge Marek Szyprowski
2016-02-03 12:42 ` [PATCH 08/10] drm/exynos: initialize DMA ops for virtual Exynos DRM device Marek Szyprowski
2016-02-12  5:55   ` Inki Dae
2016-02-12  8:44     ` Marek Szyprowski
2016-02-03 12:42 ` [PATCH 09/10] drm/exynos: exynos5433_decon: fix wrong state assignment in decon_enable Marek Szyprowski
2016-02-03 12:42 ` [PATCH 10/10] drm/exynos: exynos5433_decon: fix wrong state in decon_vblank_enable Marek Szyprowski
2016-02-08 11:14 ` [PATCH 00/10] Exynos DRM: various fixes for 64bit and Exynos5433 Emil Velikov
2016-02-12  9:19   ` Andrzej Hajda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.