[PATCH 1/2] drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl

2014-10-02 Thread Inki Dae
On 2014? 10? 02? 08:47, Joonyoung Shim wrote:
> Hi Tomasz,
> 
> On 10/02/2014 12:13 AM, Tomasz Figa wrote:
>> Hi Inki,
>>
>> On 17.09.2014 15:48, Inki Dae wrote:
>>> This interface and relevant codes aren't used anymore.
>>>
>>
>> Hmm, I might be missing something, but after removing this IOCTL, how do
>> we obtain an offset to pass to mmap()?
> 
> There is DRM_IOCTL_MODE_MAP_DUMB, it can get mmap offset before mmap and
> the offset is passed via mmap.

Exactly. That will lead us to more generic world.

Thanks,
Inki Dae

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



[PATCH 1/2] drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl

2014-10-02 Thread Tomasz Figa
On 02.10.2014 12:25, Inki Dae wrote:
> On 2014? 10? 02? 08:47, Joonyoung Shim wrote:
>> Hi Tomasz,
>>
>> On 10/02/2014 12:13 AM, Tomasz Figa wrote:
>>> Hi Inki,
>>>
>>> On 17.09.2014 15:48, Inki Dae wrote:
 This interface and relevant codes aren't used anymore.

>>>
>>> Hmm, I might be missing something, but after removing this IOCTL, how do
>>> we obtain an offset to pass to mmap()?
>>
>> There is DRM_IOCTL_MODE_MAP_DUMB, it can get mmap offset before mmap and
>> the offset is passed via mmap.
> 
> Exactly. That will lead us to more generic world.

OK. Thanks Joonyoung, Inki, for quick response. I was confused by name
of this IOCTL. I'll modify my code to use it.

Best regards,
Tomasz


[PATCH 1/2] drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl

2014-10-02 Thread Joonyoung Shim
Hi Tomasz,

On 10/02/2014 12:13 AM, Tomasz Figa wrote:
> Hi Inki,
> 
> On 17.09.2014 15:48, Inki Dae wrote:
>> This interface and relevant codes aren't used anymore.
>>
> 
> Hmm, I might be missing something, but after removing this IOCTL, how do
> we obtain an offset to pass to mmap()?

There is DRM_IOCTL_MODE_MAP_DUMB, it can get mmap offset before mmap and
the offset is passed via mmap.

Thanks.


[PATCH 1/2] drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl

2014-10-01 Thread Tomasz Figa
Hi Inki,

On 17.09.2014 15:48, Inki Dae wrote:
> This interface and relevant codes aren't used anymore.
> 

Hmm, I might be missing something, but after removing this IOCTL, how do
we obtain an offset to pass to mmap()?

Best regards,
Tomasz


[PATCH 1/2] drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl

2014-09-17 Thread Inki Dae
This interface and relevant codes aren't used anymore.

Signed-off-by: Inki Dae 
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c |3 ---
 drivers/gpu/drm/exynos/exynos_drm_gem.c |   17 -
 drivers/gpu/drm/exynos/exynos_drm_gem.h |4 
 include/uapi/drm/exynos_drm.h   |   18 --
 4 files changed, 42 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c 
b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 9b00e4e..10ad3d4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -282,9 +282,6 @@ static const struct vm_operations_struct 
exynos_drm_gem_vm_ops = {
 static const struct drm_ioctl_desc exynos_ioctls[] = {
DRM_IOCTL_DEF_DRV(EXYNOS_GEM_CREATE, exynos_drm_gem_create_ioctl,
DRM_UNLOCKED | DRM_AUTH),
-   DRM_IOCTL_DEF_DRV(EXYNOS_GEM_MAP_OFFSET,
-   exynos_drm_gem_map_offset_ioctl, DRM_UNLOCKED |
-   DRM_AUTH),
DRM_IOCTL_DEF_DRV(EXYNOS_GEM_MMAP,
exynos_drm_gem_mmap_ioctl, DRM_UNLOCKED | DRM_AUTH),
DRM_IOCTL_DEF_DRV(EXYNOS_GEM_GET,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c 
b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index 15db801..2f3665d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -318,23 +318,6 @@ void exynos_drm_gem_put_dma_addr(struct drm_device *dev,
drm_gem_object_unreference_unlocked(obj);
 }

-int exynos_drm_gem_map_offset_ioctl(struct drm_device *dev, void *data,
-   struct drm_file *file_priv)
-{
-   struct drm_exynos_gem_map_off *args = data;
-
-   DRM_DEBUG_KMS("handle = 0x%x, offset = 0x%lx\n",
-   args->handle, (unsigned long)args->offset);
-
-   if (!(dev->driver->driver_features & DRIVER_GEM)) {
-   DRM_ERROR("does not support GEM.\n");
-   return -ENODEV;
-   }
-
-   return exynos_drm_gem_dumb_map_offset(file_priv, dev, args->handle,
-   >offset);
-}
-
 int exynos_drm_gem_mmap_buffer(struct file *filp,
  struct vm_area_struct *vma)
 {
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h 
b/drivers/gpu/drm/exynos/exynos_drm_gem.h
index 1592c0b..8e46094 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h
@@ -111,10 +111,6 @@ void exynos_drm_gem_put_dma_addr(struct drm_device *dev,
unsigned int gem_handle,
struct drm_file *filp);

-/* get buffer offset to map to user space. */
-int exynos_drm_gem_map_offset_ioctl(struct drm_device *dev, void *data,
-   struct drm_file *file_priv);
-
 /*
  * mmap the physically continuous memory that a gem object contains
  * to user space.
diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index d584412..67a751c 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -33,20 +33,6 @@ struct drm_exynos_gem_create {
 };

 /**
- * A structure for getting buffer offset.
- *
- * @handle: a pointer to gem object created.
- * @pad: just padding to be 64-bit aligned.
- * @offset: relatived offset value of the memory region allocated.
- * - this value should be set by user.
- */
-struct drm_exynos_gem_map_off {
-   unsigned int handle;
-   unsigned int pad;
-   uint64_t offset;
-};
-
-/**
  * A structure for mapping buffer.
  *
  * @handle: a handle to gem object created.
@@ -316,7 +302,6 @@ struct drm_exynos_ipp_cmd_ctrl {
 };

 #define DRM_EXYNOS_GEM_CREATE  0x00
-#define DRM_EXYNOS_GEM_MAP_OFFSET  0x01
 #define DRM_EXYNOS_GEM_MMAP0x02
 /* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
 #define DRM_EXYNOS_GEM_GET 0x04
@@ -336,9 +321,6 @@ struct drm_exynos_ipp_cmd_ctrl {
 #define DRM_IOCTL_EXYNOS_GEM_CREATEDRM_IOWR(DRM_COMMAND_BASE + \
DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)

-#define DRM_IOCTL_EXYNOS_GEM_MAP_OFFSETDRM_IOWR(DRM_COMMAND_BASE + \
-   DRM_EXYNOS_GEM_MAP_OFFSET, struct drm_exynos_gem_map_off)
-
 #define DRM_IOCTL_EXYNOS_GEM_MMAP  DRM_IOWR(DRM_COMMAND_BASE + \
DRM_EXYNOS_GEM_MMAP, struct drm_exynos_gem_mmap)

-- 
1.7.9.5