All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/8] drm/i915: Unclutter the get_plane() functions
Date: Thu, 30 Oct 2014 17:31:57 +0000	[thread overview]
Message-ID: <5452760D.2030400@linux.intel.com> (raw)
In-Reply-To: <1414603367-24964-4-git-send-email-damien.lespiau@intel.com>


On 10/29/2014 05:22 PM, Damien Lespiau wrote:
> crtc->base.primary->fb was used everywhere. Use fb to temporarily point
> there and don't forget to assign fb to its final destination at the end.
>
> v2: Rebase on top of misc changes (mask of DSPSURF, PAGE_ALIGN)
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c | 61 ++++++++++++++++--------------------
>   1 file changed, 27 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2a84e47..6c042eb 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6459,9 +6459,10 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc,
>   	int pipe = crtc->pipe, plane = crtc->plane;
>   	int fourcc, pixel_format;
>   	int aligned_height;
> +	struct drm_framebuffer *fb;
>
> -	crtc->base.primary->fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL);
> -	if (!crtc->base.primary->fb) {
> +	fb = kzalloc(sizeof(struct intel_framebuffer), GFP_KERNEL);
> +	if (!fb) {
>   		DRM_DEBUG_KMS("failed to alloc fb\n");
>   		return;

Is it of any consequence that after the change crtc->base.primary->fb 
will preserve it's content, while previously it would be NULLed on 
allocation failure? Probably not, just asking...

Tvrtko

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

  reply	other threads:[~2014-10-30 17:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 17:22 [PATCH 0/8] Skylake primary plane read-out Damien Lespiau
2014-10-29 17:22 ` [PATCH 1/8] drm/i915: Change plane_config to store a tiling_mode Damien Lespiau
2014-10-29 17:22 ` [PATCH 2/8] drm/i915: Use a common function for computing the fb height alignment Damien Lespiau
2014-10-29 17:22 ` [PATCH 3/8] drm/i915: Unclutter the get_plane() functions Damien Lespiau
2014-10-30 17:31   ` Tvrtko Ursulin [this message]
2014-10-30 17:41     ` Damien Lespiau
2014-10-29 17:22 ` [PATCH 4/8] drm/i915: Don't use crtc->plane in ILK+ get_config() Damien Lespiau
2014-10-29 17:22 ` [PATCH 5/8] drm/i915: Use pipe_name() in the get_plane_config() functions Damien Lespiau
2014-10-29 17:22 ` [PATCH 6/8] drm/i915: Make intel_format_to_fourcc() static Damien Lespiau
2014-10-29 17:22 ` [PATCH 7/8] drm/i915/skl: intel_format_to_fourcc() doesn't work for SKL planes Damien Lespiau
2014-10-29 17:22 ` [PATCH 8/8] drm/i915/skl: Provide a Skylake version of get_plane_config() Damien Lespiau
2014-10-31 11:38   ` Tvrtko Ursulin
2015-01-19 18:27     ` Damien Lespiau
2015-01-20  8:06       ` Daniel Vetter
2015-01-20 11:09         ` [PATCH 8/8 v4] " Damien Lespiau
2014-11-03 15:07 ` [PATCH 0/8] Skylake primary plane read-out Daniel Vetter

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=5452760D.2030400@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.