From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
John Stultz <john.stultz@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Daniel Vetter <daniel@ffwll.ch>,
dri-devel <dri-devel@lists.freedesktop.org>,
Xiubin Zhang <zhangxiubin1@huawei.com>,
Liwei Cai <cailiwei@hisilicon.com>,
Chen Feng <puck.chen@hisilicon.com>,
linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Subject: [PATCH 14/49] staging: hikey9xx/gpu: get rid of kirin9xx_fbdev.c
Date: Wed, 19 Aug 2020 13:45:42 +0200 [thread overview]
Message-ID: <1a035c8888ddef487e940a6a16eb4725096b79e7.1597833138.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1597833138.git.mchehab+huawei@kernel.org>
We don't need to implement legacy fbdev support. Just use
the FB emulation instead.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
.../staging/hikey9xx/gpu/kirin9xx_drm_drv.c | 9 +-
.../staging/hikey9xx/gpu/kirin9xx_drm_drv.h | 2 -
drivers/staging/hikey9xx/gpu/kirin9xx_fb.c | 94 ----
drivers/staging/hikey9xx/gpu/kirin9xx_fbdev.c | 487 ------------------
4 files changed, 1 insertion(+), 591 deletions(-)
delete mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_fb.c
delete mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_fbdev.c
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c
index ec1f668f2d21..f5b05b26bc18 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c
@@ -39,10 +39,8 @@ static int kirin_drm_kms_cleanup(struct drm_device *dev)
{
struct kirin_drm_private *priv = dev->dev_private;
- if (priv->fbdev) {
- kirin_drm_fbdev_fini(dev);
+ if (priv->fbdev)
priv->fbdev = NULL;
- }
drm_kms_helper_poll_fini(dev);
drm_vblank_cleanup(dev);
@@ -75,8 +73,6 @@ static void kirin_fbdev_output_poll_changed(struct drm_device *dev)
#else
if (priv->fbdev)
drm_fb_helper_hotplug_event(priv->fbdev);
- else
- priv->fbdev = kirin_drm_fbdev_init(dev);
#endif
}
@@ -138,9 +134,6 @@ static int kirin_drm_kms_init(struct drm_device *dev)
/* reset all the states of crtc/plane/encoder/connector */
drm_mode_config_reset(dev);
- if (fbdev)
- priv->fbdev = kirin_drm_fbdev_init(dev);
-
/* init kms poll for handling hpd */
drm_kms_helper_poll_init(dev);
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h
index 697955a8e96c..18a7478fee10 100644
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h
+++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h
@@ -57,7 +57,5 @@ extern void dsi_set_output_client(struct drm_device *dev);
struct drm_framebuffer *kirin_framebuffer_init(struct drm_device *dev,
struct drm_mode_fb_cmd2 *mode_cmd);
-struct drm_fb_helper *kirin_drm_fbdev_init(struct drm_device *dev);
-void kirin_drm_fbdev_fini(struct drm_device *dev);
#endif /* __KIRIN_DRM_DRV_H__ */
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_fb.c b/drivers/staging/hikey9xx/gpu/kirin9xx_fb.c
deleted file mode 100644
index 1cb84278f507..000000000000
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_fb.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2013 Red Hat
- * Author: Rob Clark <robdclark@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <drm/drmP.h>
-
-#include "kirin_drm_drv.h"
-
-#include "drm_crtc.h"
-#include "drm_crtc_helper.h"
-
-struct kirin_framebuffer {
- struct drm_framebuffer base;
-};
-#define to_kirin_framebuffer(x) container_of(x, struct kirin_framebuffer, base)
-
-
-static int kirin_framebuffer_create_handle(struct drm_framebuffer *fb,
- struct drm_file *file_priv,
- unsigned int *handle)
-{
- //struct kirin_framebuffer *kirin_fb = to_kirin_framebuffer(fb);
- return 0;
-}
-
-static void kirin_framebuffer_destroy(struct drm_framebuffer *fb)
-{
- struct kirin_framebuffer *kirin_fb = to_kirin_framebuffer(fb);
-
- DRM_DEBUG("destroy: FB ID: %d (%p)", fb->base.id, fb);
-
- drm_framebuffer_cleanup(fb);
-
- kfree(kirin_fb);
-}
-
-static int kirin_framebuffer_dirty(struct drm_framebuffer *fb,
- struct drm_file *file_priv, unsigned flags, unsigned color,
- struct drm_clip_rect *clips, unsigned num_clips)
-{
- return 0;
-}
-
-static const struct drm_framebuffer_funcs kirin_framebuffer_funcs = {
- .create_handle = kirin_framebuffer_create_handle,
- .destroy = kirin_framebuffer_destroy,
- .dirty = kirin_framebuffer_dirty,
-};
-
-struct drm_framebuffer *kirin_framebuffer_init(struct drm_device *dev,
- struct drm_mode_fb_cmd2 *mode_cmd)
-{
- struct kirin_framebuffer *kirin_fb = NULL;
- struct drm_framebuffer *fb;
- int ret;
-
- kirin_fb = kzalloc(sizeof(*kirin_fb), GFP_KERNEL);
- if (!kirin_fb) {
- ret = -ENOMEM;
- goto fail;
- }
-
- fb = &kirin_fb->base;
-
- drm_helper_mode_fill_fb_struct(fb, mode_cmd);
-
- ret = drm_framebuffer_init(dev, fb, &kirin_framebuffer_funcs);
- if (ret) {
- dev_err(dev->dev, "framebuffer init failed: %d\n", ret);
- goto fail;
- }
-
- DRM_DEBUG("create: FB ID: %d (%p) \n", fb->base.id, fb);
-
- return fb;
-
-fail:
- kfree(kirin_fb);
-
- return ERR_PTR(ret);
-}
diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_fbdev.c b/drivers/staging/hikey9xx/gpu/kirin9xx_fbdev.c
deleted file mode 100644
index 5d09cf3784a5..000000000000
--- a/drivers/staging/hikey9xx/gpu/kirin9xx_fbdev.c
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- * Copyright (C) 2013 Red Hat
- * Author: Rob Clark <robdclark@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <drm/drmP.h>
-#include <drm_crtc_helper.h>
-
-#include <linux/ion.h>
-#include <linux/hisi/hisi_ion.h>
-
-#include "kirin_drm_drv.h"
-#if defined (CONFIG_HISI_FB_970)
-#include "kirin970_dpe_reg.h"
-#else
-#include "kirin_dpe_reg.h"
-#endif
-#include "kirin_drm_dpe_utils.h"
-
-#include "drm_crtc.h"
-#include "drm_fb_helper.h"
-
-//#define CONFIG_HISI_FB_HEAP_CARVEOUT_USED
-
-#define FBDEV_BUFFER_NUM 2
-struct fb_dmabuf_export
-{
- __u32 fd;
- __u32 flags;
-};
-#define FBIOGET_DMABUF _IOR('F', 0x21, struct fb_dmabuf_export)
-
-#define HISIFB_IOCTL_MAGIC 'M'
-#define HISI_DRM_ONLINE_PLAY _IOW(HISIFB_IOCTL_MAGIC, 0x21, struct drm_dss_layer)
-
-/*
- * fbdev funcs, to implement legacy fbdev interface on top of drm driver
- */
-
-#define HISI_FB_ION_CLIENT_NAME "hisi_fb_ion"
-
-unsigned long kirin_alloc_fb_buffer(struct kirin_fbdev *fbdev, int size)
-{
- struct ion_client *client = NULL;
- struct ion_handle *handle = NULL;
- size_t buf_len = 0;
- unsigned long buf_addr = 0;
- int shared_fd = -1;
-
- if (NULL == fbdev) {
- DRM_ERROR("fbdev is NULL!\n");
- return -EINVAL;
- }
-
- client = fbdev->ion_client;
- handle = fbdev->ion_handle;
-
- buf_len = size;
-
- client = hisi_ion_client_create(HISI_FB_ION_CLIENT_NAME);
- if (!client) {
- DRM_ERROR("failed to create ion client!\n");
- return -ENOMEM;
- }
- memset(&fbdev->iommu_format, 0, sizeof(struct iommu_map_format));
-
-#ifdef CONFIG_HISI_FB_HEAP_CARVEOUT_USED
- handle = ion_alloc(client, buf_len, PAGE_SIZE, ION_HEAP(ION_GRALLOC_HEAP_ID), 0);
-#else
- handle = ion_alloc(client, buf_len, PAGE_SIZE, ION_HEAP(ION_SYSTEM_HEAP_ID), 0);
-#endif
- if (!handle) {
- DRM_ERROR("failed to ion_alloc!\n");
- goto err_return;
- }
-
- fbdev->screen_base = ion_map_kernel(client, handle);
- if (!fbdev->screen_base) {
- DRM_ERROR("failed to ion_map_kernel!\n");
- goto err_ion_map;
- }
-
-#ifdef CONFIG_HISI_FB_HEAP_CARVEOUT_USED
- if (ion_phys(client, handle, &buf_addr, &buf_len) < 0) {
- DRM_ERROR("failed to get ion phys!\n");
- goto err_ion_get_addr;
- }
-#else
- if (ion_map_iommu(client, handle, &(fbdev->iommu_format))) {
- DRM_ERROR("failed to ion_map_iommu!\n");
- goto err_ion_get_addr;
- }
-
- buf_addr = fbdev->iommu_format.iova_start;
-#endif
-
- fbdev->shared_fd = shared_fd;
- fbdev->smem_start = buf_addr;
- fbdev->screen_size = buf_len;
- memset(fbdev->screen_base, 0x0, fbdev->screen_size);
-
- fbdev->ion_client = client;
- fbdev->ion_handle = handle;
-
- DRM_INFO("fbdev->smem_start = 0x%lu, fbdev->screen_base = 0x%p\n",
- fbdev->smem_start, fbdev->screen_base);
-
- return buf_addr;
-
-err_ion_get_addr:
- ion_unmap_kernel(client, handle);
-err_ion_map:
- ion_free(client, handle);
-err_return:
- return 0;
-}
-
-static int kirin_fbdev_mmap(struct fb_info *info, struct vm_area_struct * vma)
-{
- struct sg_table *table = NULL;
- struct scatterlist *sg = NULL;
- struct page *page = NULL;
- unsigned long remainder = 0;
- unsigned long len = 0;
- unsigned long addr = 0;
- unsigned long offset = 0;
- unsigned long size = 0;
- int i = 0;
- int ret = 0;
-
- struct drm_fb_helper *helper = (struct drm_fb_helper *)info->par;
- struct kirin_fbdev *fbdev = to_kirin_fbdev(helper);
-
- if (NULL == info) {
- DRM_ERROR("info is NULL!\n");
- return -EINVAL;
- }
-
- if (NULL == fbdev) {
- DRM_ERROR("fbdev is NULL!\n");
- return -EINVAL;
- }
-
- table = ion_sg_table(fbdev->ion_client, fbdev->ion_handle);
- if ((table == NULL) || (vma == NULL)) {
- DRM_ERROR("table or vma is NULL!\n");
- return -EFAULT;
- }
-
- vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
-
- addr = vma->vm_start;
- offset = vma->vm_pgoff * PAGE_SIZE;
- size = vma->vm_end - vma->vm_start;
- DRM_INFO("addr = 0x%lu, offset = 0x%lu, size = %lu!\n", addr, offset, size);
- if (size > info->fix.smem_len) {
- DRM_ERROR("size=%lu is out of range(%u)!\n", size, info->fix.smem_len);
- return -EFAULT;
- }
- DRM_INFO("fbdev->smem_start = 0x%lu, fbdev->screen_base = 0x%p\n",
- fbdev->smem_start, fbdev->screen_base);
-
- for_each_sg(table->sgl, sg, table->nents, i) {
- page = sg_page(sg);
- remainder = vma->vm_end - addr;
- len = sg->length;
-
- if (offset >= sg->length) {
- offset -= sg->length;
- continue;
- } else if (offset) {
- page += offset / PAGE_SIZE;
- len = sg->length - offset;
- offset = 0;
- }
- len = min(len, remainder);
- ret = remap_pfn_range(vma, addr, page_to_pfn(page), len,
- vma->vm_page_prot);
- if (ret != 0) {
- DRM_ERROR("failed to remap_pfn_range! ret=%d\n", ret);
- }
-
- addr += len;
- if (addr >= vma->vm_end) {
- DRM_INFO("addr = 0x%lu!, vma->vm_end = 0x%lu \n", addr, vma->vm_end);
- return 0;
- }
- }
-
- DRM_INFO("kirin_fbdev_mmap addr = 0x%lu!\n", addr);
-
- return 0;
-}
-
-static int kirin_dmabuf_export(struct fb_info *info, void __user *argp)
-{
- int ret;
- struct drm_fb_helper *helper;
- struct kirin_fbdev *fbdev;
- struct fb_dmabuf_export dmabuf_export;
-
- helper = (struct drm_fb_helper *)info->par;
- fbdev = to_kirin_fbdev(helper);
-
- ret = copy_from_user(&dmabuf_export, argp, sizeof(struct fb_dmabuf_export));
- if (ret) {
- DRM_ERROR("copy for user failed!ret=%d.\n", ret);
- ret = -EINVAL;
- } else {
- dmabuf_export.flags = 0;
- dmabuf_export.fd = ion_share_dma_buf_fd(fbdev->ion_client, fbdev->ion_handle);
- if (dmabuf_export.fd < 0) {
- DRM_ERROR("failed to ion_share!\n");
- }
- DRM_INFO("dmabuf_export.fd = %d.\n", dmabuf_export.fd);
-
- ret = copy_to_user(argp, &dmabuf_export, sizeof(struct fb_dmabuf_export));
- if (ret) {
- DRM_ERROR("copy to user failed!ret=%d.", ret);
- ret = -EFAULT;
- }
- }
-
- return ret;
-}
-
-static int kirin_dss_online_compose(struct fb_info *info, void __user *argp)
-{
- int ret;
- struct drm_fb_helper *helper;
- struct kirin_drm_private *priv;
- struct drm_plane *plane;
- struct kirin_fbdev *fbdev;
-
- struct drm_dss_layer layer;
-
- helper = (struct drm_fb_helper *)info->par;
- priv = helper->dev->dev_private;
- plane = priv->crtc[0]->primary;
-
- fbdev = to_kirin_fbdev(helper);
-
- ret = copy_from_user(&layer, argp, sizeof(struct drm_dss_layer));
- if (ret) {
- DRM_ERROR("copy for user failed!ret=%d.\n", ret);
- return -EINVAL;
- }
-
- hisi_dss_online_play(fbdev, plane, &layer);
-
- return ret;
-}
-
-static int kirin_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
-{
- int ret = -ENOSYS;
- void __user *argp = (void __user *)arg;
-
- if (NULL == info) {
- DRM_ERROR("info is NULL!\n");
- return -EINVAL;
- }
-
- switch (cmd) {
- case FBIOGET_DMABUF:
- ret = kirin_dmabuf_export(info, argp);
- break;
- case HISI_DRM_ONLINE_PLAY:
- ret = kirin_dss_online_compose(info, argp);
- break;
- default:
- break;
- }
-
- if (ret == -ENOSYS)
- DRM_ERROR("unsupported ioctl (%x)\n", cmd);
-
- return ret;
-}
-
-
-static struct fb_ops kirin_fb_ops = {
- .owner = THIS_MODULE,
-
- /* Note: to properly handle manual update displays, we wrap the
- * basic fbdev ops which write to the framebuffer
- */
- .fb_read = drm_fb_helper_sys_read,
- .fb_write = drm_fb_helper_sys_write,
- .fb_fillrect = drm_fb_helper_sys_fillrect,
- .fb_copyarea = drm_fb_helper_sys_copyarea,
- .fb_imageblit = drm_fb_helper_sys_imageblit,
- .fb_mmap = kirin_fbdev_mmap,
-
- .fb_check_var = drm_fb_helper_check_var,
- .fb_set_par = drm_fb_helper_set_par,
- .fb_pan_display = drm_fb_helper_pan_display,
- .fb_blank = drm_fb_helper_blank,
- .fb_setcmap = drm_fb_helper_setcmap,
-
- .fb_ioctl = kirin_fb_ioctl,
- .fb_compat_ioctl = kirin_fb_ioctl,
-};
-
-static int kirin_fbdev_create(struct drm_fb_helper *helper,
- struct drm_fb_helper_surface_size *sizes)
-{
- struct kirin_fbdev *fbdev = to_kirin_fbdev(helper);
- struct drm_device *dev = helper->dev;
- struct drm_framebuffer *fb = NULL;
- struct fb_info *fbi = NULL;
- struct drm_mode_fb_cmd2 mode_cmd = {0};
- int ret, size;
- unsigned int bytes_per_pixel;
-
- DRM_DEBUG("create fbdev: %dx%d@%d (%dx%d)\n", sizes->surface_width,
- sizes->surface_height, sizes->surface_bpp,
- sizes->fb_width, sizes->fb_height);
-
- mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
- sizes->surface_depth);
-
- mode_cmd.width = sizes->surface_width;
- mode_cmd.height = sizes->surface_height * FBDEV_BUFFER_NUM;
-
- bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8);
- mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel;
- //mode_cmd.pitches[0] = align_pitch(mode_cmd.width, sizes->surface_bpp);
-
- /* allocate backing bo */
- size = mode_cmd.pitches[0] * mode_cmd.height;
- DRM_DEBUG("allocating %d bytes for fb %d \n", size, dev->primary->index);
-
- fb = kirin_framebuffer_init(dev, &mode_cmd);
- if (IS_ERR(fb)) {
- dev_err(dev->dev, "failed to allocate fb\n");
- /* note: if fb creation failed, we can't rely on fb destroy
- * to unref the bo:
- */
- ret = PTR_ERR(fb);
- goto fail;
- }
-
- mutex_lock(&dev->struct_mutex);
-
- fbdev->ion_client = NULL;
- fbdev->ion_handle = NULL;
- fbdev->screen_base = NULL;
- fbdev->smem_start = 0;
- fbdev->screen_size = 0;
- memset(&fbdev->iommu_format, 0, sizeof(struct iommu_map_format));
-
- kirin_alloc_fb_buffer(fbdev, size);
-
- fbi = drm_fb_helper_alloc_fbi(helper);
- if (IS_ERR(fbi)) {
- dev_err(dev->dev, "failed to allocate fb info\n");
- ret = PTR_ERR(fbi);
- goto fail_unlock;
- }
-
- DRM_DEBUG("fbi=%p, dev=%p \n", fbi, dev);
-
- fbdev->fb = fb;
- helper->fb = fb;
-
- fbi->par = helper;
- fbi->flags = FBINFO_DEFAULT;
- fbi->fbops = &kirin_fb_ops;
-
- strcpy(fbi->fix.id, "dss");
-
- drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth);
- drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
-
- dev->mode_config.fb_base = fbdev->smem_start;
- fbi->screen_base = fbdev->screen_base;
- fbi->screen_size = fbdev->screen_size;
- fbi->fix.smem_start = fbdev->smem_start;
- fbi->fix.smem_len = fbdev->screen_size;
-
- DRM_DEBUG("par=%p, %dx%d \n", fbi->par, fbi->var.xres, fbi->var.yres);
- DRM_DEBUG("allocated %dx%d fb \n", fbdev->fb->width, fbdev->fb->height);
-
- mutex_unlock(&dev->struct_mutex);
-
- return 0;
-
-fail_unlock:
- mutex_unlock(&dev->struct_mutex);
-fail:
- if (ret) {
- if (fb) {
- drm_framebuffer_unregister_private(fb);
- drm_framebuffer_remove(fb);
- }
- }
- return ret;
-}
-
-static const struct drm_fb_helper_funcs kirin_fb_helper_funcs = {
- .fb_probe = kirin_fbdev_create,
-};
-
-/* initialize fbdev helper */
-struct drm_fb_helper *kirin_drm_fbdev_init(struct drm_device *dev)
-{
- struct kirin_drm_private *priv = dev->dev_private;
- struct kirin_fbdev *fbdev = NULL;
- struct drm_fb_helper *helper;
- int ret;
-
- fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
- if (!fbdev)
- goto fail;
-
- priv->fb_helper = helper = &fbdev->fb_helper;
-
- drm_fb_helper_prepare(dev, helper, &kirin_fb_helper_funcs);
-
- DRM_INFO("num_crtc=%d, num_connector=%d.\n",
- dev->mode_config.num_crtc, dev->mode_config.num_connector);
-
- ret = drm_fb_helper_init(dev, helper,
- dev->mode_config.num_crtc, dev->mode_config.num_connector);
- if (ret) {
- dev_err(dev->dev, "could not init fbdev: ret=%d\n", ret);
- goto fail;
- }
-
- ret = drm_fb_helper_single_add_all_connectors(helper);
- if (ret)
- goto fini;
-
- /* disable all the possible outputs/crtcs before entering KMS mode */
- drm_helper_disable_unused_functions(dev);
-
- ret = drm_fb_helper_initial_config(helper, 32);
- if (ret)
- goto fini;
-
- priv->fbdev = helper;
-
- return helper;
-
-fini:
- drm_fb_helper_fini(helper);
-fail:
- kfree(fbdev);
- return NULL;
-}
-
-void kirin_drm_fbdev_fini(struct drm_device *dev)
-{
- struct kirin_drm_private *priv = dev->dev_private;
- struct drm_fb_helper *helper = priv->fbdev;
- struct kirin_fbdev *fbdev;
-
- drm_fb_helper_unregister_fbi(helper);
- drm_fb_helper_release_fbi(helper);
-
- drm_fb_helper_fini(helper);
-
- fbdev = to_kirin_fbdev(priv->fbdev);
-
- /* this will free the backing object */
- if (fbdev->fb) {
- drm_framebuffer_unregister_private(fbdev->fb);
- drm_framebuffer_remove(fbdev->fb);
- }
-
- kfree(fbdev);
-
- priv->fbdev = NULL;
-}
--
2.26.2
next prev parent reply other threads:[~2020-08-19 11:48 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 11:45 [PATCH 00/49] DRM driver for Hikey 970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 01/49] staging: hikey9xx: Add hisilicon DRM driver for hikey960/970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 02/49] staging: hikey9xx/gpu: port it to work with Kernel v4.9 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 03/49] staging: hikey9xx/gpu: solve tearing issue of display Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 04/49] staging: hikey9xx/gpu: resolve the performance issue by interrupt mechanism Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 05/49] staging: hikey9xx/gpu: add support to hikey970 HDMI and panel Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 06/49] staging: hikey9xx/gpu: Solve SR Cannot Display Problems Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 07/49] staging: hikey9xx/gpu: Solve HDMI compatibility Problem Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 08/49] staging: hikey9xx/gpu: Support MIPI DSI 3 lanes for hikey970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 09/49] staging: hikey9xx/gpu: Solve SR test reset problem " Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 10/49] staging: hikey9xx/gpu: add debug prints for this driver Mauro Carvalho Chehab
2020-08-21 20:17 ` Joe Perches
2020-08-19 11:45 ` [PATCH 11/49] staging: hikey9xx/gpu: Add support 10.1 inch special HDMI displays Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 12/49] staging: hikey9xx/gpu: get rid of adv7535 fork Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 13/49] staging: hikey9xx/gpu: rename the Kirin9xx namespace Mauro Carvalho Chehab
2020-08-19 11:45 ` Mauro Carvalho Chehab [this message]
2020-08-19 11:45 ` [PATCH 15/49] staging: hikey9xx/gpu: get rid of some ifdefs Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 16/49] staging: hikey9xx/gpu: rename the config option for Kirin970 Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 17/49] staging: hikey9xx/gpu: change the includes to reflect upstream Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 18/49] staging: hikey9xx/gpu: port driver to upstream kAPIs Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 19/49] staging: hikey9xx/gpu: add a copy of set_reg() function there Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 20/49] staging: hikey9xx/gpu: get rid of ION headers Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 21/49] staging: hikey9xx/gpu: add support for using a reserved CMA memory Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 22/49] staging: hikey9xx/gpu: cleanup encoder attach logic Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 23/49] staging: hikey9xx/gpu: Change the logic which sets the burst mode Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 24/49] staging: hikey9xx/gpu: fix the DRM setting logic Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 25/49] staging: hikey9xx/gpu: do some code cleanups Mauro Carvalho Chehab
2020-08-20 1:53 ` John Stultz
2020-08-20 8:23 ` Mauro Carvalho Chehab
2020-08-21 20:12 ` John Stultz
2020-08-19 11:45 ` [PATCH 26/49] staging: hikey9xx/gpu: use default GEM_CMA fops Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 27/49] staging: hikey9xx/gpu: place vblank enable/disable at the right place Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 28/49] staging: hikey9xx/gpu: remove an uneeded hack Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 29/49] staging: hikey9xx/gpu: add a possible implementation for atomic_disable Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 30/49] staging: hikey9xx/gpu: register connector Mauro Carvalho Chehab
2020-08-19 11:45 ` [PATCH 31/49] staging: hikey9xx/gpu: fix driver name Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 32/49] staging: hikey9xx/gpu: get rid of iommu_format Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 33/49] staging: hikey9xx/gpu: re-work the mode validation code Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 34/49] staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 35/49] staging: hikey9xx/gpu: add SPMI headers Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 36/49] staging: hikey9xx/gpu: solve most coding style issues Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 37/49] staging: hikey9xx/gpu: don't use iommu code Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 38/49] staging: hikey9xx/gpu: add kirin9xx driver to the building system Mauro Carvalho Chehab
2020-08-19 15:30 ` Randy Dunlap
2020-08-19 11:46 ` [PATCH 39/49] staging: hikey9xx/gpu: get rid of typedefs Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 40/49] staging: hikey9xx/gpu: get rid of input/output macros Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 41/49] staging: hikey9xx/gpu: get rid of some unused data Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 42/49] staging: hikey9xx/gpu: place common definitions at kirin9xx_dpe.h Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 43/49] staging: hikey9xx/gpu: get rid of DRM_HISI_KIRIN970 Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 44/49] dts: hisilicon: hi3670.dtsi: add I2C settings Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 45/49] dts: hikey970-pinctrl.dtsi: add missing pinctrl settings Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 46/49] dt: hisilicon: add support for the PMIC found on Hikey 970 Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 47/49] dts: add support for Hikey 970 DRM Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 48/49] staging: hikey9xx/gpu: drop kirin9xx_pwm Mauro Carvalho Chehab
2020-08-19 11:46 ` [PATCH 49/49] dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Mauro Carvalho Chehab
2020-08-19 21:02 ` Sam Ravnborg
2020-08-19 22:36 ` Rob Herring
2020-08-19 15:21 ` [PATCH 00/49] DRM driver for Hikey 970 Sam Ravnborg
2020-08-19 15:30 ` Laurent Pinchart
2020-08-19 19:52 ` John Stultz
2020-08-20 7:03 ` Mauro Carvalho Chehab
2020-08-20 10:02 ` Laurent Pinchart
2020-08-24 19:29 ` Dave Airlie
2020-08-25 11:30 ` Mauro Carvalho Chehab
2020-08-25 11:38 ` Laurent Pinchart
2020-08-25 12:31 ` Daniel Stone
2020-08-26 14:44 ` Nicolas Dufresne
2020-08-19 15:40 ` Mauro Carvalho Chehab
2020-08-19 17:35 ` Sam Ravnborg
2020-08-20 14:06 ` Mauro Carvalho Chehab
2020-08-20 14:48 ` Sam Ravnborg
2020-08-20 15:13 ` Mauro Carvalho Chehab
2020-08-20 15:36 ` Sam Ravnborg
2020-08-21 13:37 ` Mauro Carvalho Chehab
2020-08-21 13:58 ` Mauro Carvalho Chehab
2020-08-21 15:55 ` Sam Ravnborg
2020-08-24 16:02 ` Mauro Carvalho Chehab
2020-08-24 18:45 ` Sam Ravnborg
2020-08-24 21:10 ` Sam Ravnborg
2020-08-24 21:24 ` Sam Ravnborg
2020-08-25 18:11 ` Sam Ravnborg
2020-08-25 20:21 ` Sam Ravnborg
2020-08-21 14:41 ` Mauro Carvalho Chehab
2020-08-21 15:56 ` Sam Ravnborg
2020-08-24 16:06 ` Mauro Carvalho Chehab
2020-08-19 20:48 ` Sam Ravnborg
2020-08-20 7:21 ` Michel Dänzer
2020-08-20 7:21 ` Mauro Carvalho Chehab
2020-08-21 16:09 ` Joe Perches
2020-08-19 21:13 ` John Stultz
2020-08-19 21:25 ` Sam Ravnborg
2020-08-20 6:40 ` Mauro Carvalho Chehab
2020-08-20 6:34 ` Mauro Carvalho Chehab
2020-08-19 21:36 ` John Stultz
2020-08-20 2:01 ` John Stultz
2020-08-20 3:28 ` John Stultz
2020-08-20 7:48 ` Mauro Carvalho Chehab
2020-08-24 6:49 ` Mauro Carvalho Chehab
2020-08-24 13:18 ` Mauro Carvalho Chehab
2020-08-20 8:04 ` Mauro Carvalho Chehab
2020-08-20 3:39 ` [PATCH 1/3] drm: hikey9xx: Fix inconsistent compat string John Stultz
2020-08-20 3:40 ` [PATCH 2/3] drm: kirin9xxx: Add additional color formats John Stultz
2020-08-20 3:41 ` [PATCH 3/3] drm: hikey9xxx: Fix null pointer crash on reboot John Stultz
2020-08-20 3:56 ` [PATCH 4/3] drm: hikey9xx: remove wait for VACTIVE IRQ John Stultz
2020-08-20 9:04 ` [PATCH 1/3] drm: hikey9xx: Fix inconsistent compat string Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a035c8888ddef487e940a6a16eb4725096b79e7.1597833138.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=cailiwei@hisilicon.com \
--cc=daniel@ffwll.ch \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mani@kernel.org \
--cc=mauro.chehab@huawei.com \
--cc=puck.chen@hisilicon.com \
--cc=zhangxiubin1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).