All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Stone <daniels@collabora.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	John Hunter <zhaojunwang@pku.edu.cn>
Subject: Re: [PATCH] drm/crtc-helper: Fixup error handling in drm_helper_crtc_mode_set
Date: Thu, 02 Jul 2015 10:01:31 +0100	[thread overview]
Message-ID: <1435827691.5668.1.camel@collabora.com> (raw)
In-Reply-To: <1435821829-11107-1-git-send-email-daniel.vetter@ffwll.ch>

Hi,

On Thu, 2015-07-02 at 09:23 +0200, Daniel Vetter wrote:
> In
> 
> commit 9f658b7b62e7aefc1ee067136126eca3f58cabfd
> Author: Daniel Stone <daniels@collabora.com>
> Date:   Fri May 22 13:34:45 2015 +0100
> 
>     drm/crtc_helper: Replace open-coded CRTC state helpers
> 
> error handling code was broken, resulting in the first path not being
> checked correctly. Fix this by using the same pattern as in the
> transitional plane helper function drm_plane_helper_update.
> 
> @@ -927,15 +927,13 @@ int drm_helper_crtc_mode_set(struct drm_crtc
> *crtc, struct drm_display_mode *mod
>  
>  	if (crtc->funcs->atomic_duplicate_state)
>  		crtc_state = crtc->funcs
> ->atomic_duplicate_state(crtc);
> -	else {
> +	else if (crtc->state)
> +		crtc_state = 
> drm_atomic_helper_crtc_duplicate_state(crtc);
> +	else
>  		crtc_state = kzalloc(sizeof(*crtc_state), 
> GFP_KERNEL);
> -		if (!crtc_state)
> -			return -ENOMEM;
> -		if (crtc->state)
> -			__drm_atomic_helper_crtc_duplicate_state(crt
> c, crtc_state);
> -		else
> -			crtc_state->crtc = crtc;

Isn't this line (the crtc_state->crtc) assignment now missing from the
kzalloc branch?

With that fixed:
Reviewed-by: Daniel Stone <daniels@collabora.com>

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-07-02  9:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  7:23 [PATCH] drm/crtc-helper: Fixup error handling in drm_helper_crtc_mode_set Daniel Vetter
2015-07-02  7:29 ` Daniel Vetter
2015-07-02  9:01 ` Daniel Stone [this message]
2015-07-02 13:16 ` Daniel Vetter
2015-07-02 13:27   ` Daniel Stone
2015-07-02 14:29     ` Daniel Vetter
2015-07-02 14:33     ` [PATCH] drm: reset empty state in transitional helpers Daniel Vetter
2015-07-02 14:39       ` John Hunter
2015-07-03  7:10       ` Daniel Stone
2015-07-02 14:40   ` [PATCH] drm/crtc-helper: Fixup error handling in drm_helper_crtc_mode_set John Hunter
2015-07-04 16:57   ` shuang.he
2015-07-02 14:00 ` [PATCH 1/2] " Daniel Vetter
2015-07-02 14:00   ` [PATCH 2/2] drm/plane-helper: Use init state when freshly allocating them Daniel Vetter
2015-07-04 19:11     ` shuang.he
2015-07-04 10:39 ` [PATCH] drm/crtc-helper: Fixup error handling in drm_helper_crtc_mode_set shuang.he

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=1435827691.5668.1.camel@collabora.com \
    --to=daniels@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=zhaojunwang@pku.edu.cn \
    /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.