drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.c
The variable name "exynos_gem_obj" is too long, so some lines exceed 80 characters. It's simple to use "obj" instead of "exynos_gem_obj". Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
94e30d93f9
commit
39a839f2e6
1 changed files with 14 additions and 16 deletions
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
struct exynos_drm_fbdev {
|
struct exynos_drm_fbdev {
|
||||||
struct drm_fb_helper drm_fb_helper;
|
struct drm_fb_helper drm_fb_helper;
|
||||||
struct exynos_drm_gem_obj *exynos_gem_obj;
|
struct exynos_drm_gem_obj *obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int exynos_drm_fb_mmap(struct fb_info *info,
|
static int exynos_drm_fb_mmap(struct fb_info *info,
|
||||||
|
@ -40,7 +40,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info,
|
||||||
{
|
{
|
||||||
struct drm_fb_helper *helper = info->par;
|
struct drm_fb_helper *helper = info->par;
|
||||||
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper);
|
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(helper);
|
||||||
struct exynos_drm_gem_obj *obj = exynos_fbd->exynos_gem_obj;
|
struct exynos_drm_gem_obj *obj = exynos_fbd->obj;
|
||||||
unsigned long vm_size;
|
unsigned long vm_size;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
|
||||||
struct drm_fb_helper_surface_size *sizes)
|
struct drm_fb_helper_surface_size *sizes)
|
||||||
{
|
{
|
||||||
struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);
|
struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper);
|
||||||
struct exynos_drm_gem_obj *exynos_gem_obj;
|
struct exynos_drm_gem_obj *obj;
|
||||||
struct drm_device *dev = helper->dev;
|
struct drm_device *dev = helper->dev;
|
||||||
struct fb_info *fbi;
|
struct fb_info *fbi;
|
||||||
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
|
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
|
||||||
|
@ -146,27 +146,25 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
|
||||||
|
|
||||||
size = mode_cmd.pitches[0] * mode_cmd.height;
|
size = mode_cmd.pitches[0] * mode_cmd.height;
|
||||||
|
|
||||||
exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size);
|
obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size);
|
||||||
/*
|
/*
|
||||||
* If physically contiguous memory allocation fails and if IOMMU is
|
* If physically contiguous memory allocation fails and if IOMMU is
|
||||||
* supported then try to get buffer from non physically contiguous
|
* supported then try to get buffer from non physically contiguous
|
||||||
* memory area.
|
* memory area.
|
||||||
*/
|
*/
|
||||||
if (IS_ERR(exynos_gem_obj) && is_drm_iommu_supported(dev)) {
|
if (IS_ERR(obj) && is_drm_iommu_supported(dev)) {
|
||||||
dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n");
|
dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n");
|
||||||
exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG,
|
obj = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG, size);
|
||||||
size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR(exynos_gem_obj)) {
|
if (IS_ERR(obj)) {
|
||||||
ret = PTR_ERR(exynos_gem_obj);
|
ret = PTR_ERR(obj);
|
||||||
goto err_release_fbi;
|
goto err_release_fbi;
|
||||||
}
|
}
|
||||||
|
|
||||||
exynos_fbdev->exynos_gem_obj = exynos_gem_obj;
|
exynos_fbdev->obj = obj;
|
||||||
|
|
||||||
helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd,
|
helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd, &obj->base);
|
||||||
&exynos_gem_obj->base);
|
|
||||||
if (IS_ERR(helper->fb)) {
|
if (IS_ERR(helper->fb)) {
|
||||||
DRM_ERROR("failed to create drm framebuffer.\n");
|
DRM_ERROR("failed to create drm framebuffer.\n");
|
||||||
ret = PTR_ERR(helper->fb);
|
ret = PTR_ERR(helper->fb);
|
||||||
|
@ -187,7 +185,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
|
||||||
err_destroy_framebuffer:
|
err_destroy_framebuffer:
|
||||||
drm_framebuffer_cleanup(helper->fb);
|
drm_framebuffer_cleanup(helper->fb);
|
||||||
err_destroy_gem:
|
err_destroy_gem:
|
||||||
exynos_drm_gem_destroy(exynos_gem_obj);
|
exynos_drm_gem_destroy(obj);
|
||||||
err_release_fbi:
|
err_release_fbi:
|
||||||
drm_fb_helper_release_fbi(helper);
|
drm_fb_helper_release_fbi(helper);
|
||||||
|
|
||||||
|
@ -282,11 +280,11 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
|
||||||
struct drm_fb_helper *fb_helper)
|
struct drm_fb_helper *fb_helper)
|
||||||
{
|
{
|
||||||
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(fb_helper);
|
struct exynos_drm_fbdev *exynos_fbd = to_exynos_fbdev(fb_helper);
|
||||||
struct exynos_drm_gem_obj *exynos_gem_obj = exynos_fbd->exynos_gem_obj;
|
struct exynos_drm_gem_obj *obj = exynos_fbd->obj;
|
||||||
struct drm_framebuffer *fb;
|
struct drm_framebuffer *fb;
|
||||||
|
|
||||||
if (exynos_gem_obj->kvaddr)
|
if (obj->kvaddr)
|
||||||
vunmap(exynos_gem_obj->kvaddr);
|
vunmap(obj->kvaddr);
|
||||||
|
|
||||||
/* release drm framebuffer and real buffer */
|
/* release drm framebuffer and real buffer */
|
||||||
if (fb_helper->fb && fb_helper->fb->funcs) {
|
if (fb_helper->fb && fb_helper->fb->funcs) {
|
||||||
|
|
Loading…
Reference in a new issue