From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniels@collabora.com>
Cc: intel-gfx@lists.freedesktop.org,
"Ville Syrjälä" <ville.syrjala@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v2 2/2] drm/i915: Move GEM BO inside drm_framebuffer
Date: Fri, 18 May 2018 17:12:01 +0300 [thread overview]
Message-ID: <20180518141201.GZ23723@intel.com> (raw)
In-Reply-To: <20180518134844.13248-2-daniels@collabora.com>
On Fri, May 18, 2018 at 02:48:44PM +0100, Daniel Stone wrote:
> Since drm_framebuffer can now store GEM objects directly, place them
> there rather than in our own subclass.
>
> v2: Only hold a single reference per framebuffer, not per plane. (Ville)
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Cc: Ville Syrjälä <ville.syrjala@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> ---
> drivers/gpu/drm/i915/intel_display.c | 4 ++--
> drivers/gpu/drm/i915/intel_drv.h | 3 +--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1b2cf631305e..12226a2c8d39 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14370,9 +14370,9 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
> i, fb->pitches[i], stride_alignment);
> goto err;
> }
> - }
>
> - intel_fb->obj = obj;
> + fb->obj[i] = &obj->base;
> + }
>
> ret = intel_fill_fb_info(dev_priv, fb);
> if (ret)
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 12002fc77235..03e1d1d7fb58 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -194,7 +194,6 @@ enum intel_output_type {
>
> struct intel_framebuffer {
> struct drm_framebuffer base;
> - struct drm_i915_gem_object *obj;
> struct intel_rotation_info rot_info;
>
> /* for each plane in the normal GTT view */
> @@ -1005,7 +1004,7 @@ struct cxsr_latency {
> #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
> #define to_intel_plane(x) container_of(x, struct intel_plane, base)
> #define to_intel_plane_state(x) container_of(x, struct intel_plane_state, base)
> -#define intel_fb_obj(x) (x ? to_intel_framebuffer(x)->obj : NULL)
> +#define intel_fb_obj(x) (((x) && (x)->obj[0]) ? to_intel_bo((x)->obj[0]) : NULL)
We don't need the obj[0] null check. For most things we just assume
that the base object is at offset 0. And in case of drm_i915_gem_object
it looks like we even have a BUILD_BUG_ON() to make sure. So you may
want to drop that part.
Series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> struct intel_hdmi {
> i915_reg_t hdmi_reg;
> --
> 2.17.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-05-18 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 13:48 [PATCH v2 1/2] drm/i915: Use intel_fb_obj() everywhere Daniel Stone
2018-05-18 13:48 ` [PATCH v2 2/2] drm/i915: Move GEM BO inside drm_framebuffer Daniel Stone
2018-05-18 14:12 ` Ville Syrjälä [this message]
2018-05-18 13:56 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] drm/i915: Use intel_fb_obj() everywhere Patchwork
2018-05-18 13:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-18 14:11 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-18 19:01 ` ✓ 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=20180518141201.GZ23723@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniels@collabora.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=ville.syrjala@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