RE: [PATCH 3/4] drm: exynos: Don't cast GEM object to Exynos GEM object when not needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxxxxxxxxx]
> Sent: Thursday, May 17, 2012 12:09 AM
> To: Inki Dae
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Subject: [PATCH 3/4] drm: exynos: Don't cast GEM object to Exynos GEM
> object when not needed
> 
> The exynos_drm_gem_dumb_map_offset() doesn't need to access any
> Exynos-specific GEM object fields, don't cast the GEM object.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_gem.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c
> b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> index 1dffa83..a3362c9 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
> @@ -638,7 +638,6 @@ int exynos_drm_gem_dumb_map_offset(struct drm_file
> *file_priv,
>  				   struct drm_device *dev, uint32_t handle,
>  				   uint64_t *offset)
>  {
> -	struct exynos_drm_gem_obj *exynos_gem_obj;
>  	struct drm_gem_object *obj;
>  	int ret = 0;
> 
> @@ -659,15 +658,13 @@ int exynos_drm_gem_dumb_map_offset(struct drm_file
> *file_priv,
>  		goto unlock;
>  	}
> 
> -	exynos_gem_obj = to_exynos_gem_obj(obj);
> -
> -	if (!exynos_gem_obj->base.map_list.map) {
> -		ret = drm_gem_create_mmap_offset(&exynos_gem_obj->base);
> +	if (!obj->map_list.map) {
> +		ret = drm_gem_create_mmap_offset(obj);
>  		if (ret)
>  			goto out;
>  	}
> 

This is cleanup we missed. Applied.

Thanks,
Inki Dae


> -	*offset = (u64)exynos_gem_obj->base.map_list.hash.key << PAGE_SHIFT;
> +	*offset = (u64)obj->map_list.hash.key << PAGE_SHIFT;
>  	DRM_DEBUG_KMS("offset = 0x%lx\n", (unsigned long)*offset);
> 
>  out:
> --
> 1.7.3.4

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


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux