drm: rp1: VEC and DPI drivers: Fix bug #5901
authorNick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Sat, 3 Feb 2024 12:04:00 +0000 (12:04 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:36 +0000 (11:35 +0000)
commit3dff33936b5970e349d31c8d2b101de89cfe03c4
tree67ff2000fe86bf1bf6efe752f92ffacf01e4410b
parent5dff4a08a74361c00ec0daf410d147210ba8f7d3
drm: rp1: VEC and DPI drivers: Fix bug #5901

Rework probe() to use devm_drm_dev_alloc(), embedding the DRM
device in the DPI or VEC device as now seems to be recommended.

Change order of resource allocation and driver initialization.
This prevents it trying to write to an unmapped register during
clean-up, which previously could crash.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi.c
drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi.h
drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi_hw.c
drivers/gpu/drm/rp1/rp1-vec/rp1_vec.c
drivers/gpu/drm/rp1/rp1-vec/rp1_vec.h
drivers/gpu/drm/rp1/rp1-vec/rp1_vec_hw.c