Rahul Sharma | 6 Mar 09:02 2014

[RFC 0/4] drm: add generic KMS blob properties for image enhancement

From: Rahul Sharma <Rahul.Sharma <at> samsung.com>

Patch set has following proposal.

1) Add writable KMS blob properties
	patch 1: drm: allow to create blank writable blob properties
	patch 2: drm: add ioctl to write into binary blob KMS properties

2) Add generic image enhancement properties. Added as per exynos hardware
	requirements (to start).
	patch 3: drm: add generic blob properties for image enhancement

3) Allow drivers to create writable blob properties
	patch 4: drm: export create and destroy function for blob properties

Initial discussion before preparing this RFC is at
http://comments.gmane.org/gmane.linux.kernel.samsung-soc/27278

This series is based on Dave's drm-next branch at
http://cgit.freedesktop.org/~airlied/linux/

Rahul Sharma (4):
  drm: allow to create blank writable blob properties
  drm: add ioctl to write into binary blob KMS properties
  drm: add generic blob properties for image enhancement
  drm: export create and destroy function for blob properties

 drivers/gpu/drm/drm_crtc.c  |  201 +++++++++++++++++++++++++++++++++++++++++--
 drivers/gpu/drm/drm_drv.c   |    1 +
 include/drm/drm_crtc.h      |   19 ++++
(Continue reading)

Rahul Sharma | 6 Mar 09:02 2014

[RFC 2/4] drm: add ioctl to write into binary blob KMS properties

Add a new ioctl to common drm framework which can be used to
set variable length binary data from the user space. 'Blob'
is the only KMS property which can hold more than 64 bits. So
far, it has been implemented as read only property for user
application (only used for EDID data).

Signed-off-by: Rahul Sharma <rahul.sharma <at> samsung.com>
---
 drivers/gpu/drm/drm_crtc.c  |   73 ++++++++++++++++++++++++++++++++++++++++++-
 drivers/gpu/drm/drm_drv.c   |    1 +
 include/drm/drm_crtc.h      |    2 ++
 include/uapi/drm/drm.h      |    1 +
 include/uapi/drm/drm_mode.h |    8 +++++
 5 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 9a2215c..a2b87a5 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
 <at>  <at>  -3300,7 +3300,6  <at>  <at>  static bool drm_property_change_is_valid(struct drm_property *property,
 			valid_mask |= (1ULL << property->values[i]);
 		return !(value & ~valid_mask);
 	} else if (property->flags & DRM_MODE_PROP_BLOB) {
-		/* Only the driver knows */
 		return true;
 	} else {
 		int i;
 <at>  <at>  -3492,6 +3491,78  <at>  <at>  out:
 	return ret;
 }
(Continue reading)

Rahul Sharma | 6 Mar 09:02 2014

[RFC 4/4] drm: export create and destroy function for blob properties

Drm drivers can also create and attach private blob properties.
This patch exports functions to create and destroy blob properties.

Signed-off-by: Rahul Sharma <rahul.sharma <at> samsung.com>
---
 drivers/gpu/drm/drm_crtc.c |    8 +++++---
 include/drm/drm_crtc.h     |    4 ++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 8771abf..f1939c2 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
 <at>  <at>  -3299,8 +3299,8  <at>  <at>  done:
 	return ret;
 }

-static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev, int length,
-							  void *data)
+struct drm_property_blob *drm_property_create_blob(struct drm_device *dev,
+			int length, void *data)
 {
 	struct drm_property_blob *blob;
 	int ret;
 <at>  <at>  -3326,14 +3326,16  <at>  <at>  static struct drm_property_blob *drm_property_create_blob(struct
drm_device *dev
 	list_add_tail(&blob->head, &dev->mode_config.property_blob_list);
 	return blob;
 }
+EXPORT_SYMBOL(drm_property_create_blob);
(Continue reading)

Rahul Sharma | 6 Mar 09:02 2014

[RFC 1/4] drm: allow to create blank writable blob properties

There is no provision to create a blob property without
providing binary data. This data is needed to fill inside
the blob.

With subsequent patches, blob properties are modified to
receive well defined structures by the user application.
DRM creates a blank blob (initialized with all zeros) which
can be filled by user application through set_blob ioctl.

Signed-off-by: Rahul Sharma <rahul.sharma <at> samsung.com>
---
 drivers/gpu/drm/drm_crtc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 35ea15d..9a2215c 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
 <at>  <at>  -3190,7 +3190,7  <at>  <at>  static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev
 	struct drm_property_blob *blob;
 	int ret;

-	if (!length || !data)
+	if (!length)
 		return NULL;

 	blob = kzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL);
 <at>  <at>  -3205,7 +3205,8  <at>  <at>  static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev

 	blob->length = length;
(Continue reading)

Rahul Sharma | 6 Mar 09:02 2014

[RFC 3/4] drm: add generic blob properties for image enhancement

Add generic KMS blob properties to core drm framework. These
are writable blob properties which can be used to set Image
Enhancement parameters. The properties which are added here
are meant for color reproduction, color saturation and edge
enhancement.

Signed-off-by: Rahul Sharma <rahul.sharma <at> samsung.com>
---
 drivers/gpu/drm/drm_crtc.c  |  115 +++++++++++++++++++++++++++++++++++++++++++
 include/drm/drm_crtc.h      |   13 +++++
 include/uapi/drm/drm_mode.h |   41 +++++++++++++++
 3 files changed, 169 insertions(+)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index a2b87a5..8771abf 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
 <at>  <at>  -1260,6 +1260,121  <at>  <at>  int drm_mode_create_dirty_info_property(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_mode_create_dirty_info_property);

+/**
+ * drm_mode_create_color_saturation_property - create property for color saturation
+ *  <at> dev: DRM device
+ *
+ */
+int drm_mode_create_color_saturation_property(
+			struct drm_device *dev)
+{
+	struct drm_mode_color_saturation *params;
(Continue reading)


Gmane