All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: inline skl_copy_ddb_for_pipe() to its only caller
Date: Thu, 12 Jul 2018 14:33:51 -0700	[thread overview]
Message-ID: <1531431231.2700.12.camel@intel.com> (raw)
In-Reply-To: <152841534651.1522.4602792960108190614@mail.alporthouse.com>

Em Sex, 2018-06-08 às 00:49 +0100, Chris Wilson escreveu:
> Quoting Paulo Zanoni (2018-06-08 00:07:00)
> >  static void
> >  skl_print_wm_changes(const struct drm_atomic_state *state)
> >  {
> > @@ -5381,7 +5370,10 @@ static void skl_initial_wm(struct
> > intel_atomic_state *state,
> >         if (cstate->base.active_changed)
> >                 skl_atomic_update_crtc_wm(state, cstate);
> >  
> > -       skl_copy_ddb_for_pipe(hw_vals, results, pipe);
> > +       memcpy(hw_vals->ddb.uv_plane[pipe], results-
> > >ddb.uv_plane[pipe],
> > +              sizeof(hw_vals->ddb.uv_plane[pipe]));
> 
> I must be seeing things.
> 
> ddb.uv_plane[pipe] must be a pointer, right?

No, it's an array of structs.


> Therefore sizeof(ddb.uv_plane[pipe]) must the size of that pointer
> and
> not of the struct.

It is the size of the array, which is 20 (both before and after the
patch). Each member has size 4.


>  Do you not mean sizeof(*ddb.uv_plane[pipe]) ?

What's written above means "size of the first element of
ddb.uv_plane[pipe]". This sizeof operation returns 4 instead of 20. We
don't want to copy just the first element of uv_plane[pipe].

> 
> Definitely time to stop reading code...
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-07-12 21:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 23:07 [PATCH] drm/i915: inline skl_copy_ddb_for_pipe() to its only caller Paulo Zanoni
2018-06-07 23:43 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-06-07 23:49 ` [PATCH] " Chris Wilson
2018-07-12 21:33   ` Paulo Zanoni [this message]
2018-06-08  2:00 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-07-26  6:05 ` [PATCH] " Kumar, Mahesh

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=1531431231.2700.12.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.