From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/display: Use correct method to free crtc_state
Date: Thu, 12 Oct 2023 00:54:46 +0300 [thread overview]
Message-ID: <ZScZpse50iMYsAOa@intel.com> (raw)
In-Reply-To: <20231010183101.704439-3-suraj.kandpal@intel.com>
On Wed, Oct 11, 2023 at 12:01:01AM +0530, Suraj Kandpal wrote:
> Even though there is no leaking of resource here lets
> just use the correct method to free crtc_state
>
> Fixes: 8a3b3df39757 ("drm/i915: Clean up variable names in old dpll functions")
That is clearly not the right commit to blame here. I've
just dropped the whole fixes tag since there is nothing
real to fix here anyway.
I also dropped the fixes tag from the other patch since I
don't think that original commit would leak anything. The
potential for leaks appeared later as we got eg. gamma
readout that might allocate additional things and hang them
off the crtc state. And as the potential leak can happen
only during driver loading it's mostly harmless.
Anyways, both patches pushed now. Thanks.
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dpll.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll.c b/drivers/gpu/drm/i915/display/intel_dpll.c
> index 2255ad651486..d41c1dc9f66c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll.c
> @@ -7,6 +7,7 @@
> #include <linux/string_helpers.h>
>
> #include "i915_reg.h"
> +#include "intel_atomic.h"
> #include "intel_crtc.h"
> #include "intel_cx0_phy.h"
> #include "intel_de.h"
> @@ -2006,7 +2007,7 @@ int vlv_force_pll_on(struct drm_i915_private *dev_priv, enum pipe pipe,
> vlv_enable_pll(crtc_state);
> }
>
> - kfree(crtc_state);
> + intel_crtc_destroy_state(&crtc->base, &crtc_state->uapi);
>
> return 0;
> }
> --
> 2.25.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-10-11 21:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 18:30 [Intel-gfx] [PATCH 0/2] Use intel_crtc_destroy state Suraj Kandpal
2023-10-10 18:31 ` [Intel-gfx] [PATCH 1/2] drm/i915/display: Use intel_crtc_destroy_state instead kfree Suraj Kandpal
2023-10-10 18:31 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Use correct method to free crtc_state Suraj Kandpal
2023-10-11 21:54 ` Ville Syrjälä [this message]
2023-10-11 3:35 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Use intel_crtc_destroy state Patchwork
2023-10-11 3:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-11 17:52 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZScZpse50iMYsAOa@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox