mirror_ubuntu-kernels/drivers/gpu/drm/vc4
Maxime Ripard 5f701324c0
drm/vc4: perfmon: Fix variable dereferenced before check
Commit 30f8c74ca9 ("drm/vc4: Warn if some v3d code is run on BCM2711")
introduced a check in vc4_perfmon_get() that dereferences a pointer before
we checked whether that pointer is valid or not.

Let's rework that function a bit to do things in the proper order.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 30f8c74ca9 ("drm/vc4: Warn if some v3d code is run on BCM2711")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220622080243.22119-1-maxime@cerno.tech
2022-06-27 15:43:14 +02:00
..
Kconfig Linux 5.18-rc5 2022-05-03 16:08:48 +10:00
Makefile drm/vc4: hdmi: Add PHY init and disable function 2020-09-07 18:06:04 +02:00
vc4_bo.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_crtc.c drm/vc4: crtc: Fix out of order frames during asynchronous page flips 2022-06-16 11:07:52 +02:00
vc4_debugfs.c drm/vc4: Leverage the load tracker on the BCM2711 2021-11-04 10:36:25 +01:00
vc4_dpi.c drm/vc4: dpi: Switch to devm_drm_of_get_bridge 2021-09-14 10:39:30 +02:00
vc4_drv.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_drv.h drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_dsi.c drm/vc4: Use pm_runtime_resume_and_get to fix pm_runtime_get_sync() usage 2022-04-21 09:09:24 +02:00
vc4_fence.c
vc4_gem.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +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: Support HDMI YUV output 2022-03-24 13:44:00 +01:00
vc4_hdmi.c drm/vc4: hdmi: Fixed possible integer overflow 2022-06-22 09:30:17 +02:00
vc4_hdmi.h drm/vc4: hdmi: Remove vc4_hdmi_encoder 2022-04-21 09:01:16 +02:00
vc4_hvs.c drm/vc4: Consolidate Hardware Revision Check 2022-06-16 11:07:51 +02:00
vc4_irq.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_kms.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_packet.h
vc4_perfmon.c drm/vc4: perfmon: Fix variable dereferenced before check 2022-06-27 15:43:14 +02:00
vc4_plane.c drm/vc4: plane: Register a different drm_plane_helper_funcs on BCM2711 2022-06-16 11:07:51 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: hvs: Fix frame count register readout 2022-04-06 15:18:01 +02:00
vc4_render_cl.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +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 Merge tag 'drm-msm-next-2022-05-09' of https://gitlab.freedesktop.org/drm/msm into drm-next 2022-05-11 12:40:47 +10:00
vc4_v3d.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_validate_shaders.c drm/vc4: Warn if some v3d code is run on BCM2711 2022-06-16 11:07:52 +02:00
vc4_validate.c drm/vc4: fix error code in vc4_check_tex_size() 2022-06-22 16:41:30 +02:00
vc4_vec.c drm/vc4: Separate VEC compatible variants 2021-05-24 13:52:33 +02:00