[PATCH 1/7] drm/i915: Make intel_plane_state subclass drm_plane_state
Bob Paauwe
bob.j.paauwe at intel.com
Thu Nov 13 13:25:33 PST 2014
On Thu, 13 Nov 2014 10:43:20 -0800
Matt Roper <matthew.d.roper at intel.com> wrote:
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
Reviewed-by: Bob Paauwe <bob.j.paauwe at intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 28 ++++++++++++++--------------
> drivers/gpu/drm/i915/intel_drv.h | 3 +--
> drivers/gpu/drm/i915/intel_sprite.c | 16 ++++++++--------
> 3 files changed, 23 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 73e6656..a9f90b8 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11553,8 +11553,8 @@ static int
> intel_check_primary_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> - struct drm_crtc *crtc = state->crtc;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_crtc *crtc = state->base.crtc;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_rect *dest = &state->dst;
> struct drm_rect *src = &state->src;
> const struct drm_rect *clip = &state->clip;
> @@ -11570,8 +11570,8 @@ static int
> intel_prepare_primary_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> - struct drm_crtc *crtc = state->crtc;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_crtc *crtc = state->base.crtc;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_device *dev = crtc->dev;
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> enum pipe pipe = intel_crtc->pipe;
> @@ -11606,8 +11606,8 @@ static void
> intel_commit_primary_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> - struct drm_crtc *crtc = state->crtc;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_crtc *crtc = state->base.crtc;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_device *dev = crtc->dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> @@ -11707,8 +11707,8 @@ intel_primary_plane_setplane(struct drm_plane *plane, struct drm_crtc *crtc,
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> int ret;
>
> - state.crtc = crtc;
> - state.fb = fb;
> + state.base.crtc = crtc;
> + state.base.fb = fb;
>
> /* sample coordinates in 16.16 fixed point */
> state.src.x1 = src_x;
> @@ -11820,9 +11820,9 @@ static int
> intel_check_cursor_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> - struct drm_crtc *crtc = state->crtc;
> + struct drm_crtc *crtc = state->base.crtc;
> struct drm_device *dev = crtc->dev;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_rect *dest = &state->dst;
> struct drm_rect *src = &state->src;
> const struct drm_rect *clip = &state->clip;
> @@ -11876,8 +11876,8 @@ static int
> intel_commit_cursor_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> - struct drm_crtc *crtc = state->crtc;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_crtc *crtc = state->base.crtc;
> + struct drm_framebuffer *fb = state->base.fb;
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> struct intel_plane *intel_plane = to_intel_plane(plane);
> struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb);
> @@ -11922,8 +11922,8 @@ intel_cursor_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
> struct intel_plane_state state;
> int ret;
>
> - state.crtc = crtc;
> - state.fb = fb;
> + state.base.crtc = crtc;
> + state.base.fb = fb;
>
> /* sample coordinates in 16.16 fixed point */
> state.src.x1 = src_x;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 8432ae2..bd5ef4e 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -244,8 +244,7 @@ typedef struct dpll {
> } intel_clock_t;
>
> struct intel_plane_state {
> - struct drm_crtc *crtc;
> - struct drm_framebuffer *fb;
> + struct drm_plane_state base;
> struct drm_rect src;
> struct drm_rect dst;
> struct drm_rect clip;
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 7d9c340..fc96d13 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1096,9 +1096,9 @@ static int
> intel_check_sprite_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> - struct intel_crtc *intel_crtc = to_intel_crtc(state->crtc);
> + struct intel_crtc *intel_crtc = to_intel_crtc(state->base.crtc);
> struct intel_plane *intel_plane = to_intel_plane(plane);
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> int crtc_x, crtc_y;
> unsigned int crtc_w, crtc_h;
> @@ -1262,11 +1262,11 @@ intel_prepare_sprite_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> struct drm_device *dev = plane->dev;
> - struct drm_crtc *crtc = state->crtc;
> + struct drm_crtc *crtc = state->base.crtc;
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> struct intel_plane *intel_plane = to_intel_plane(plane);
> enum pipe pipe = intel_crtc->pipe;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> struct drm_i915_gem_object *old_obj = intel_plane->obj;
> int ret;
> @@ -1297,11 +1297,11 @@ intel_commit_sprite_plane(struct drm_plane *plane,
> struct intel_plane_state *state)
> {
> struct drm_device *dev = plane->dev;
> - struct drm_crtc *crtc = state->crtc;
> + struct drm_crtc *crtc = state->base.crtc;
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> struct intel_plane *intel_plane = to_intel_plane(plane);
> enum pipe pipe = intel_crtc->pipe;
> - struct drm_framebuffer *fb = state->fb;
> + struct drm_framebuffer *fb = state->base.fb;
> struct drm_i915_gem_object *obj = intel_fb_obj(fb);
> struct drm_i915_gem_object *old_obj = intel_plane->obj;
> int crtc_x, crtc_y;
> @@ -1391,8 +1391,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> int ret;
>
> - state.crtc = crtc;
> - state.fb = fb;
> + state.base.crtc = crtc;
> + state.base.fb = fb;
>
> /* sample coordinates in 16.16 fixed point */
> state.src.x1 = src_x;
More information about the dri-devel
mailing list