linux/drivers/gpu/drm/mgag200
Thomas Zimmermann 55a6916db7 drm/mgag200: Bind I2C lifetime to DRM device
commit eb1ae34e48 upstream.

Managed cleanup with devm_add_action_or_reset() will release the I2C
adapter when the underlying Linux device goes away. But the connector
still refers to it, so this cleanup leaves behind a stale pointer
in struct drm_connector.ddc.

Bind the lifetime of the I2C adapter to the connector's lifetime by
using DRM's managed release. When the DRM device goes away (after
the Linux device) DRM will first clean up the connector and then
clean up the I2C adapter.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Fixes: b279df2429 ("drm/mgag200: Switch I2C code to managed cleanup")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.0+
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-3-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-08-14 13:53:00 +02:00
..
Kconfig drm/mgag200: Add support for G200 desktop cards 2020-08-03 09:43:00 +02:00
Makefile drm/mgag200: Provide per-device callbacks for PIXPLLC 2022-07-29 16:01:47 +02:00
mgag200_bmc.c drm/mgag200: Provide per-device callbacks for BMC synchronization 2022-07-29 16:01:47 +02:00
mgag200_drv.c drm pull for 6.1-rc1 2022-10-05 11:24:12 -07:00
mgag200_drv.h drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2024-01-10 17:10:21 +01:00
mgag200_g200.c drm/mgag200: Remove type field from struct mga_device 2022-07-29 16:01:47 +02:00
mgag200_g200eh.c drm/mgag200: Remove type field from struct mga_device 2022-07-29 16:01:47 +02:00
mgag200_g200eh3.c drm/mgag200: Remove type field from struct mga_device 2022-07-29 16:01:47 +02:00
mgag200_g200er.c drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2024-01-10 17:10:21 +01:00
mgag200_g200ev.c drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2024-01-10 17:10:21 +01:00
mgag200_g200ew3.c drm/mgag200: Remove type field from struct mga_device 2022-07-29 16:01:47 +02:00
mgag200_g200se.c drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2024-01-10 17:10:21 +01:00
mgag200_g200wb.c drm/mgag200: Remove type field from struct mga_device 2022-07-29 16:01:47 +02:00
mgag200_i2c.c drm/mgag200: Bind I2C lifetime to DRM device 2024-08-14 13:53:00 +02:00
mgag200_mode.c drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE 2024-01-10 17:10:21 +01:00
mgag200_reg.h drm/mgag200:remove rebundant word "or" in comments 2022-07-18 18:44:01 +02:00