summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vboxvideo/vbox_main.c
AgeCommit message (Collapse)AuthorFilesLines
2022-11-05drm/fb-helper: Remove unnecessary include statementsThomas Zimmermann1-1/+0
Remove include statements for <drm/drm_fb_helper.h> where it is not required (i.e., most of them). In a few places include other header files that are required by the source code. v3: * fix amdgpu include statements * fix rockchip include statements Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-23-tzimmermann@suse.de
2021-11-18drm/vboxvideo: fix a NULL vs IS_ERR() checkDan Carpenter1-2/+2
The devm_gen_pool_create() function never returns NULL, it returns error pointers. Fixes: 4cc9b565454b ("drm/vboxvideo: Use devm_gen_pool_create") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211118111233.GA1147@kili
2021-01-06drm/vboxvideo: Remove references to struct drm_device.pdevThomas Zimmermann1-2/+6
Using struct drm_device.pdev is deprecated. Convert vboxvideo to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-18-tzimmermann@suse.de
2020-04-28drm/vboxvideo: Use devm_gen_pool_createDaniel Vetter1-14/+8
Aside from deleting all the cleanup code we're now also setting a name for the pool Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-7-daniel.vetter@ffwll.ch
2020-04-28drm/vboxvideo: use managed pci functionsDaniel Vetter1-6/+1
Allows us to drop the cleanup code on the floor. Sam noticed in his review: > With this change we avoid calling pci_disable_device() > twise in case vbox_mm_init() fails. > Once in vbox_hw_fini() and once in the error path. v2: Include Sam's review remarks v3: Fix typo in commit summary (Thomas Zimmermann) Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-6-daniel.vetter@ffwll.ch
2019-10-16drm/vboxvideo: Replace struct vram_framebuffer with generic implemenationThomas Zimmermann1-60/+0
The vboxvideo driver's struct vram_framebuffer stores a DRM framebuffer with an assiciated GEM object. This functionality is also provided by generic code. Switch vboxvideo over. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191011134808.3955-4-tzimmermann@suse.de
2019-10-16drm/vboxvideo: Switch to drm_atomic_helper_dirty_fb()Thomas Zimmermann1-59/+2
The vboxvideo driver provides struct drm_framebuffer_funcs.dirty_fb from its own implementation. Switch over to drm_atomic_helper_dirty_fb() and handle screen updates in the primary plane's atomic_update function. With dirty_fb out of the way, we can further replace struct vbox_frammebuffer with generic code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191011134808.3955-3-tzimmermann@suse.de
2019-08-06drm/vram: use embedded gem objectGerd Hoffmann1-1/+1
Drop drm_gem_object from drm_gem_vram_object, use the ttm_buffer_object.base instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: http://patchwork.freedesktop.org/patch/msgid/20190805140119.7337-3-kraxel@redhat.com
2019-05-15drm/vboxvideo: Convert vboxvideo driver to VRAM MMThomas Zimmermann1-11/+2
The data structure |struct drm_vram_mm| and its helpers replace vboxvideo's TTM-based memory manager. It's the same implementation; except for the type names. v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement vbox_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-19-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-05-15drm/vboxvideo: Convert vboxvideo driver to |struct drm_gem_vram_object|Thomas Zimmermann1-62/+8
This patch replaces |struct vbox_bo| and its helpers with the generic implementation of |struct drm_gem_vram_object|. The only change in semantics is that &ttm_bo_driver.verify_access() now does the actual verification. v4: * select config option DRM_VRAM_HELPER v3: * remove forward declaration of struct vbox_gem_object v2: nothing Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-18-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-11drm/vboxvideo: Move the vboxvideo driver out of stagingHans de Goede1-0/+361
The vboxvideo driver has been converted to the atomic modesetting API and all FIXME and TODO items have been fixed, so it is time to move it out of staging. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190304164724.10210-4-hdegoede@redhat.com