[PATCH 1/7] drm/i915: Clear plane_config->fb pointer when done
Ville Syrjala <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-gfx,org.freedesktop.lists.intel-xe |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland |
| Message-ID | <[email protected]> |
From: Ville Syrjälä <[email protected]> Clear the pointer after we unref/free plane_config->fb. The plane_config struct will persist after this while we repeat the readout for other pipes, so having a stale pointer hanging around is a bit dangerous. Signed-off-by: Ville Syrjälä <[email protected]> --- drivers/gpu/drm/i915/display/intel_initial_plane.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_initial_plane.c b/drivers/gpu/drm/i915/display/intel_initial_plane.c index 7427f41e4d7e..4c7e5de924cf 100644 --- a/drivers/gpu/drm/i915/display/intel_initial_plane.c +++ b/drivers/gpu/drm/i915/display/intel_initial_plane.c @@ -198,6 +198,8 @@ static void plane_config_fini(struct intel_display *display, drm_framebuffer_put(fb); else kfree(fb); + + plane_config->fb = NULL; } display->parent->initial_plane->config_fini(plane_config); -- 2.54.0