diff options
author | Dave Airlie <airlied@redhat.com> | 2023-09-29 08:27:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2023-09-29 08:27:15 +1000 |
commit | 79fb229b8810071648b65c37382aea7819a5f935 (patch) | |
tree | bf201cd7732ad48ad98a963344cb535b95653804 /drivers/gpu/drm/vc4 | |
parent | f107ff76a8c242b298413ef52db9978dc3fe0153 (diff) | |
parent | 78f54469b871db5ba8ea49abd4e5994e97bd525b (diff) | |
download | linux-79fb229b8810071648b65c37382aea7819a5f935.tar.gz linux-79fb229b8810071648b65c37382aea7819a5f935.tar.bz2 linux-79fb229b8810071648b65c37382aea7819a5f935.zip |
Merge tag 'drm-misc-next-2023-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v6.7-rc1:
UAPI Changes:
- drm_file owner is now updated during use, in the case of a drm fd
opened by the display server for a client, the correct owner is
displayed.
- Qaic gains support for the QAIC_DETACH_SLICE_BO ioctl to allow bo
recycling.
Cross-subsystem Changes:
- Disable boot logo for au1200fb, mmpfb and unexport logo helpers.
Only fbcon should manage display of logo.
- Update freescale in MAINTAINERS.
- Add some bridge files to bridge in MAINTAINERS.
- Update gma500 driver repo in MAINTAINERS to point to drm-misc.
Core Changes:
- Move size computations to drm buddy allocator.
- Make drm_atomic_helper_shutdown(NULL) a nop.
- Assorted small fixes in drm_debugfs, DP-MST payload addition error handling.
- Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR handling.
- Handle bad (h/v)sync_end in EDID by clipping to htotal.
- Build GPUVM as a module.
Driver Changes:
- Simple drivers don't need to cache prepared result.
- Call drm_atomic_helper_shutdown() in shutdown/unbind for a whole lot
more drm drivers.
- Assorted small fixes in amdgpu, ssd130x, bridge/it6621, accel/qaic,
nouveau, tc358768.
- Add NV12 for komeda writeback.
- Add arbitration lost event to synopsis/dw-hdmi-cec.
- Speed up s/r in nouveau by not restoring some big bo's.
- Assorted nouveau display rework in preparation for GSP-RM,
especially related to how the modeset sequence works and
the DP sequence in relation to link training.
- Update anx7816 panel.
- Support NVSYNC and NHSYNC in tegra.
- Allow multiple power domains in simple driver.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f1fae5eb-25b8-192a-9a53-215e1184ce81@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_drv.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 1b3531374967..c133e96b8aca 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -324,21 +324,21 @@ static int vc4_drm_bind(struct device *dev) if (!is_vc5) { ret = drmm_mutex_init(drm, &vc4->bin_bo_lock); if (ret) - return ret; + goto err; ret = vc4_bo_cache_init(drm); if (ret) - return ret; + goto err; } ret = drmm_mode_config_init(drm); if (ret) - return ret; + goto err; if (!is_vc5) { ret = vc4_gem_init(drm); if (ret) - return ret; + goto err; } node = of_find_compatible_node(NULL, NULL, "raspberrypi,bcm2835-firmware"); @@ -346,13 +346,15 @@ static int vc4_drm_bind(struct device *dev) firmware = rpi_firmware_get(node); of_node_put(node); - if (!firmware) - return -EPROBE_DEFER; + if (!firmware) { + ret = -EPROBE_DEFER; + goto err; + } } ret = drm_aperture_remove_framebuffers(driver); if (ret) - return ret; + goto err; if (firmware) { ret = rpi_firmware_property(firmware, @@ -366,32 +368,33 @@ static int vc4_drm_bind(struct device *dev) ret = component_bind_all(dev, drm); if (ret) - return ret; + goto err; ret = devm_add_action_or_reset(dev, vc4_component_unbind_all, vc4); if (ret) - return ret; + goto err; ret = vc4_plane_create_additional_planes(drm); if (ret) - goto unbind_all; + goto err; ret = vc4_kms_load(drm); if (ret < 0) - goto unbind_all; + goto err; drm_for_each_crtc(crtc, drm) vc4_crtc_disable_at_boot(crtc); ret = drm_dev_register(drm, 0); if (ret < 0) - goto unbind_all; + goto err; drm_fbdev_dma_setup(drm, 16); return 0; -unbind_all: +err: + platform_set_drvdata(pdev, NULL); return ret; } @@ -401,6 +404,7 @@ static void vc4_drm_unbind(struct device *dev) drm_dev_unplug(drm); drm_atomic_helper_shutdown(drm); + dev_set_drvdata(dev, NULL); } static const struct component_master_ops vc4_drm_ops = { @@ -444,6 +448,11 @@ static void vc4_platform_drm_remove(struct platform_device *pdev) component_master_del(&pdev->dev, &vc4_drm_ops); } +static void vc4_platform_drm_shutdown(struct platform_device *pdev) +{ + drm_atomic_helper_shutdown(platform_get_drvdata(pdev)); +} + static const struct of_device_id vc4_of_match[] = { { .compatible = "brcm,bcm2711-vc5", }, { .compatible = "brcm,bcm2835-vc4", }, @@ -455,6 +464,7 @@ MODULE_DEVICE_TABLE(of, vc4_of_match); static struct platform_driver vc4_platform_driver = { .probe = vc4_platform_drm_probe, .remove_new = vc4_platform_drm_remove, + .shutdown = vc4_platform_drm_shutdown, .driver = { .name = "vc4-drm", .of_match_table = vc4_of_match, |