mirror_ubuntu-kernels/drivers/gpu/drm/vc4
Gaosheng Cui dba9e34674
drm/vc4: kms: Fix IS_ERR() vs NULL check for vc4_kms
The drm_atomic_get_new_private_obj_state() function returns NULL
on error path, drm_atomic_get_old_private_obj_state() function
returns NULL on error path, too, they does not return error pointers.

By the way, vc4_hvs_get_new/old_global_state() should return
ERR_PTR(-EINVAL), otherwise there will be null-ptr-defer issue,
such as follows:

In function vc4_atomic_commit_tail():
  |-- old_hvs_state = vc4_hvs_get_old_global_state(state); <-- return NULL
  |-- if (WARN_ON(IS_ERR(old_hvs_state))) <-- no return
  |-- unsigned long state_rate = max(old_hvs_state->core_clock_rate,
	new_hvs_state->core_clock_rate); <-- null-ptr-defer

Fixes: 9ec03d7f1e ("drm/vc4: kms: Wait on previous FIFO users before a commit")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20221110094445.2930509-6-cuigaosheng1@huawei.com
2022-11-10 12:46:02 +01:00
..
Kconfig drm/vc4: hdmi: Depends on CONFIG_PM 2022-08-18 17:14:58 +02:00
Makefile
vc4_bo.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_crtc.c drm/vc4: crtc: protect device resources after removal 2022-08-25 09:44:26 +02:00
vc4_debugfs.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_dpi.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_drv.c drm/vc4: Fix missing platform_unregister_drivers() call in vc4_drm_register() 2022-11-07 11:29:40 +01:00
vc4_drv.h drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_dsi.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_fence.c
vc4_gem.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_hdmi_phy.c drm/vc4: hdmi: Rename pixel_rate variable 2022-03-24 13:43:59 +01:00
vc4_hdmi_regs.h drm/vc4: hdmi: Add MISC_CONTROL register for vc4 2022-06-28 14:56:08 +02:00
vc4_hdmi.c drm/vc4: hdmi: Fix HSM clock too low on Pi4 2022-11-03 09:26:42 +01:00
vc4_hdmi.h drm/vc4: hdmi: Fix HSM clock too low on Pi4 2022-11-03 09:26:42 +01:00
vc4_hvs.c drm/vc4: hvs: protect drm_print_regset32() 2022-08-25 09:44:26 +02:00
vc4_irq.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_kms.c drm/vc4: kms: Fix IS_ERR() vs NULL check for vc4_kms 2022-11-10 12:46:02 +01:00
vc4_packet.h
vc4_perfmon.c drm/vc4: perfmon: Add missing mutex_destroy 2022-07-13 10:46:13 +02:00
vc4_plane.c drm/vc4: plane: protect device resources after removal 2022-08-25 09:44:25 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: drop unexpected word "the" in the comments 2022-06-22 09:22:55 +02:00
vc4_render_cl.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_trace_points.c
vc4_trace.h drm/vc4: add tracepoints for CL submissions 2022-03-17 15:12:25 +01:00
vc4_txp.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_v3d.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_validate_shaders.c drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_validate.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_vec.c drm/vc4: vec: Fix timings for VEC modes 2022-09-07 10:28:48 +02:00