Skip to contentSkip to conversation

drm/exynos: remove uneeded declaration of struct dma_iommu_mapping

PATCH In review Gustavo Padovan 2 participants 14 messages Oct 31, 2014 – Nov 13, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 drm/exynos: remove uneeded declaration of struct dma_iommu_mapping

From: Gustavo Padovan <[email protected]>

It is not even used in this header anymore.

---
 drivers/gpu/drm/exynos/exynos_drm_iommu.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_iommu.h +0 -1
index 72376d4..35d2588 100644
@@ -40,7 +40,6 @@ static inline bool is_drm_iommu_supported(struct drm_device *drm_dev)
 
 #else
 
-struct dma_iommu_mapping;
 static inline int drm_create_iommu_mapping(struct drm_device *drm_dev)
 {
 	return 0;
Signature · 1 line
1.9.3
#1 lore raw

PATCH 2/9 drm/exynos: remove extra declaration of struct exynos_drm_manager

From: Gustavo Padovan <[email protected]>

The struct is defined in the same file, declare it here is just unnecessary.

---
 drivers/gpu/drm/exynos/exynos_drm_encoder.h | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_encoder.h +0 -2
index b7a1620..26305d8 100644
@@ -14,8 +14,6 @@
 #ifndef _EXYNOS_DRM_ENCODER_H_
 #define _EXYNOS_DRM_ENCODER_H_
 
-struct exynos_drm_manager;
-
 void exynos_drm_encoder_setup(struct drm_device *dev);
 struct drm_encoder *exynos_drm_encoder_create(struct drm_device *dev,
 			struct exynos_drm_display *mgr,
Signature · 1 line
1.9.3
#2 lore raw

PATCH 3/9 drm/exynos: remove extra declaration of struct exynos_overlay

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

The struct is defined in the same file, declare it here is just unnecessary

---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +0 -1
index 3c81c4b..3905e30 100644
@@ -37,7 +37,6 @@
 #define wait_for(COND, MS) _wait_for(COND, MS)
 
 struct drm_device;
-struct exynos_drm_overlay;
 struct drm_connector;
 
 /* This enumerates device type. */
Signature · 6 lines
1.9.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH 4/9 drm/exynos: Replace repeated declaration by include <drm/drmP.h>

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

Re-declare struct is not a good practice, let's use the original drm declarations.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +1 -3
index 3905e30..7806981 100644
@@ -15,6 +15,7 @@
 #ifndef _EXYNOS_DRM_DRV_H_
 #define _EXYNOS_DRM_DRV_H_
 
+#include <drm/drmP.h>
 #include <linux/module.h>
 
 #define MAX_CRTC	3
@@ -36,9 +37,6 @@
 
 #define wait_for(COND, MS) _wait_for(COND, MS)
 
-struct drm_device;
-struct drm_connector;
-
 /* This enumerates device type. */
 enum exynos_drm_device_type {
 	EXYNOS_DEVICE_TYPE_NONE,
Signature · 6 lines
1.9.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH 5/9 drm/exynos: Replace repeated declarations by #include "exynos_drm_drv.h"

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

Re-declare struct is not a good practice, let's use the original drm and exynos declarations.

---
 drivers/gpu/drm/exynos/exynos_drm_crtc.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.h +1 -4
index 690dcdd..e353d35 100644
@@ -15,10 +15,7 @@
 #ifndef _EXYNOS_DRM_CRTC_H_
 #define _EXYNOS_DRM_CRTC_H_
 
-struct drm_device;
-struct drm_crtc;
-struct exynos_drm_manager;
-struct exynos_drm_overlay;
+#include "exynos_drm_drv.h"
 
 int exynos_drm_crtc_create(struct exynos_drm_manager *manager);
 int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe);
Signature · 1 line
1.9.3
#5 lore raw

PATCH 6/9 drm/exynos: remove unused wait_for macro

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

This is a leftover, all code using this macro have been removed/ changed already.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 14 --------------
 1 file changed, 14 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +0 -14
index 7806981..9e4a7e1 100644
@@ -23,20 +23,6 @@
 #define MAX_FB_BUFFER	4
 #define DEFAULT_ZPOS	-1
 
-#define _wait_for(COND, MS) ({ \
-	unsigned long timeout__ = jiffies + msecs_to_jiffies(MS);	\
-	int ret__ = 0;							\
-	while (!(COND)) {						\
-		if (time_after(jiffies, timeout__)) {			\
-			ret__ = -ETIMEDOUT;				\
-			break;						\
-		}							\
-	}								\
-	ret__;								\
-})
-
-#define wait_for(COND, MS) _wait_for(COND, MS)
-
 /* This enumerates device type. */
 enum exynos_drm_device_type {
 	EXYNOS_DEVICE_TYPE_NONE,
Signature · 6 lines
1.9.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

PATCH 7/9 drm/exynos: Save up space using bool var as bitfields

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

Save a few bytes by compiling them all in the same byte.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +8 -8
index 9e4a7e1..f77e6aa 100644
@@ -66,10 +66,10 @@ enum exynos_drm_output_type {
  * @dma_addr: array of bus(accessed by dma) address to the memory region
  *	      allocated for a overlay.
  * @zpos: order of overlay layer(z position).
- * @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
  *			as index color.
+ * @default_win: a window to be enabled.
+ * @color_key: color key on or off.
  * @local_path: in case of lcd type, local path mode on or off.
  * @transparency: transparency on or off.
  * @activated: activated or not.
@@ -97,13 +97,13 @@ struct exynos_drm_overlay {
 	uint32_t pixel_format;
 	dma_addr_t dma_addr[MAX_FB_BUFFER];
 	int zpos;
-
-	bool default_win;
-	bool color_key;
 	unsigned int index_color;
-	bool local_path;
-	bool transparency;
-	bool activated;
+
+	bool default_win:1;
+	bool color_key:1;
+	bool local_path:1;
+	bool transparency:1;
+	bool activated:1;
 };
 
 /*
Signature · 1 line
1.9.3
#7 lore raw

PATCH 8/9 drm/exynos: update documentation to reflect code changes

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

Description of the @create_connector callback was missing, and the @manager was no longer needed.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +1 -2
index f77e6aa..e762cbb 100644
@@ -110,6 +110,7 @@ struct exynos_drm_overlay {
  * Exynos DRM Display Structure.
  *	- this structure is common to analog tv, digital tv and lcd panel.
  *
+ * @create_connector: initialize and register a new connector
  * @remove: cleans up the display for removal
  * @mode_fixup: fix mode data comparing to hw specific display mode.
  * @mode_set: convert drm_display_mode to hw specific display mode and
@@ -262,8 +263,6 @@ struct exynos_drm_private {
  * @dev: pointer to device object for subdrv device driver.
  * @drm_dev: pointer to drm_device and this pointer would be set
  *	when sub driver calls exynos_drm_subdrv_register().
- * @manager: subdrv has its own manager to control a hardware appropriately
- *     and we can access a hardware drawing on this manager.
  * @probe: this callback would be called by exynos drm driver after
  *     subdrv is registered to it.
  * @remove: this callback is used to release resources created
Signature · 1 line
1.9.3
#8 lore raw

PATCH 9/9 drm/exynos: remove leftover hdmi function declarations

In reply to Gustavo Padovan

From: Gustavo Padovan <[email protected]>

They are not implemented anywhere, so wipe them out.

---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 11 -----------
 1 file changed, 11 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.h +0 -11
index e762cbb..262a459 100644
@@ -294,17 +294,6 @@ int exynos_drm_device_subdrv_remove(struct drm_device *dev);
 int exynos_drm_subdrv_open(struct drm_device *dev, struct drm_file *file);
 void exynos_drm_subdrv_close(struct drm_device *dev, struct drm_file *file);
 
-/*
- * this function registers exynos drm hdmi platform device. It ensures only one
- * instance of the device is created.
- */
-int exynos_platform_device_hdmi_register(void);
-
-/*
- * this function unregisters exynos drm hdmi platform device if it exists.
- */
-void exynos_platform_device_hdmi_unregister(void);
-
 #ifdef CONFIG_DRM_EXYNOS_IPP
 int exynos_platform_device_ipp_register(void);
 void exynos_platform_device_ipp_unregister(void);
Signature · 6 lines
1.9.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw
In reply to Gustavo Padovan

Hi Inki,

Could you please give a review to this series?

Thanks.

Gustavo

2014-10-31 Gustavo Padovan <[email protected]>:

Quoted 24 lines

From: Gustavo Padovan <[email protected]>

It is not even used in this header anymore.

---
 drivers/gpu/drm/exynos/exynos_drm_iommu.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_iommu.h +0 -1
index 72376d4..35d2588 100644
@@ -40,7 +40,6 @@ static inline bool is_drm_iommu_supported(struct drm_device *drm_dev)
 
 #else
 
-struct dma_iommu_mapping;
 static inline int drm_create_iommu_mapping(struct drm_device *drm_dev)
 {
 	return 0;
Signature · 1 line
1.9.3
maintainer
#10 lore raw

Hi Gustavo,

Quoted 4 lines · Gustavo Padovan

Hi Inki,

Could you please give a review to this series?

It looks good to me. This patch series is just cleanup but not test so I will merge them next week after testing if there is no any comment.

Thanks,
Inki Dae

Quoted 36 lines

Thanks.

Gustavo

2014-10-31 Gustavo Padovan <[email protected]>:

Quoted 24 lines

From: Gustavo Padovan <[email protected]>

It is not even used in this header anymore.

---
 drivers/gpu/drm/exynos/exynos_drm_iommu.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_iommu.h +0 -1
index 72376d4..35d2588 100644
@@ -40,7 +40,6 @@ static inline bool is_drm_iommu_supported(struct drm_device *drm_dev)
 
 #else
 
-struct dma_iommu_mapping;
 static inline int drm_create_iommu_mapping(struct drm_device *drm_dev)
 {
 	return 0;
Signature · 1 line
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw

Hi Inki,

2014-11-06 Inki Dae <[email protected]>:

Quoted 11 lines

Hi Gustavo,

Quoted 4 lines · Gustavo Padovan

Hi Inki,

Could you please give a review to this series?

It looks good to me. This patch series is just cleanup but not test so I will merge them next week after testing if there is no any comment.

Is there any comments on this series or are the patches ready to be merged?

Thanks

Gustavo
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer
#12 lore raw

Sorry for late.

I started to test and migrate them to exynos-drm-next yesterday. So I guess that you can see your patch series on exynos-drm-next today night or tomorrow.

Thanks,
Inki Dae

Quoted 18 lines · Gustavo Padovan

Hi Inki,

2014-11-06 Inki Dae <[email protected]>:

Quoted 11 lines

Hi Gustavo,

Quoted 4 lines · Gustavo Padovan

Hi Inki,

Could you please give a review to this series?

It looks good to me. This patch series is just cleanup but not test so I will merge them next week after testing if there is no any comment.

Is there any comments on this series or are the patches ready to be merged?

Quoted 8 lines

Thanks

Gustavo
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

maintainer
#13 lore raw
In reply to Gustavo Padovan
Quoted 3 lines · Gustavo Padovan

From: Gustavo Padovan <[email protected]>

It is not even used in this header anymore.

All patches, Applied.

Thanks,
Inki Dae

Quoted 12 lines
---
 drivers/gpu/drm/exynos/exynos_drm_iommu.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_iommu.h +0 -0
index 72376d4..35d2588 100644

drivers/gpu/drm/exynos/exynos_drm_iommu.h static inline bool is_drm_iommu_supported(struct drm_device *drm_dev) · line 45

Quoted 7 lines
drivers/gpu/drm/exynos/exynos_drm_iommu.h +0 -1
@@ -40,7 +40,6 @@ static inline bool is_drm_iommu_supported(struct drm_device *drm_dev)
 
 #else
 
-struct dma_iommu_mapping;
 static inline int drm_create_iommu_mapping(struct drm_device *drm_dev)
 {
 	return 0;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel