All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Free crtc_state in verify_crtc_state
Date: Mon, 09 Oct 2023 13:36:52 +0300	[thread overview]
Message-ID: <874jj06q0r.fsf@intel.com> (raw)
In-Reply-To: <20231009095946.655337-1-suraj.kandpal@intel.com>

On Mon, 09 Oct 2023, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> Free hw_crtc_state in verify_crtc_state after we are done using
> this or else it's just a resource leak.

Fixes: ?

>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_modeset_verify.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_modeset_verify.c b/drivers/gpu/drm/i915/display/intel_modeset_verify.c
> index 303eb68fec11..5e1c2c780412 100644
> --- a/drivers/gpu/drm/i915/display/intel_modeset_verify.c
> +++ b/drivers/gpu/drm/i915/display/intel_modeset_verify.c
> @@ -214,7 +214,7 @@ verify_crtc_state(struct intel_atomic_state *state,
>  	}
>  
>  	if (!sw_crtc_state->hw.active)
> -		return;
> +		goto destroy_state;
>  
>  	intel_pipe_config_sanity_check(hw_crtc_state);
>  
> @@ -224,6 +224,9 @@ verify_crtc_state(struct intel_atomic_state *state,
>  		intel_crtc_state_dump(hw_crtc_state, NULL, "hw state");
>  		intel_crtc_state_dump(sw_crtc_state, NULL, "sw state");
>  	}
> +
> +destroy_state:
> +	intel_crtc_destroy_state(&crtc->base, &hw_crtc_state->uapi);
>  }
>  
>  void intel_modeset_verify_crtc(struct intel_atomic_state *state,

-- 
Jani Nikula, Intel

  reply	other threads:[~2023-10-09 10:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09  9:59 [Intel-gfx] [PATCH] drm/i915/display: Free crtc_state in verify_crtc_state Suraj Kandpal
2023-10-09 10:36 ` Jani Nikula [this message]
2023-10-09 10:58   ` Kandpal, Suraj
2023-10-09 12:37     ` Ville Syrjälä
2023-10-10  2:31       ` Kandpal, Suraj
2023-10-09 12:48     ` Jani Nikula
2023-10-09 20:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-10-10  1:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-10  5:32 ` [Intel-gfx] [PATCH] " Suraj Kandpal
2023-10-10 18:55   ` Ville Syrjälä
2023-10-10 10:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Free crtc_state in verify_crtc_state (rev2) Patchwork
2023-10-10 17:24 ` [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=874jj06q0r.fsf@intel.com \
    --to=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.