diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-03-19 11:57:11 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-20 06:48:19 -0400 |
commit | bdd7554d568fa165b0e86fc32b1cde3c895ff774 (patch) | |
tree | f3a352f3da3431e9b6bb219cb9c2a8d81a51622d | |
parent | 6702cf16e0ba8b0129f5aa1b6609d4e9c70bc13b (diff) |
drm/i915: Kill intel_plane->obj
intel_plane->obj is not used anymore so kill it. Also don't pass both
the fb and obj to the sprite .update_plane() hook, as just passing the fb
is enough.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 18 |
3 files changed, 10 insertions, 17 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f1c0295f69e5..3c91bd19987b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -12091,8 +12091,6 @@ intel_commit_primary_plane(struct drm_plane *plane, | |||
12091 | struct drm_device *dev = plane->dev; | 12091 | struct drm_device *dev = plane->dev; |
12092 | struct drm_i915_private *dev_priv = dev->dev_private; | 12092 | struct drm_i915_private *dev_priv = dev->dev_private; |
12093 | struct intel_crtc *intel_crtc; | 12093 | struct intel_crtc *intel_crtc; |
12094 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | ||
12095 | struct intel_plane *intel_plane = to_intel_plane(plane); | ||
12096 | struct drm_rect *src = &state->src; | 12094 | struct drm_rect *src = &state->src; |
12097 | 12095 | ||
12098 | crtc = crtc ? crtc : plane->crtc; | 12096 | crtc = crtc ? crtc : plane->crtc; |
@@ -12102,8 +12100,6 @@ intel_commit_primary_plane(struct drm_plane *plane, | |||
12102 | crtc->x = src->x1 >> 16; | 12100 | crtc->x = src->x1 >> 16; |
12103 | crtc->y = src->y1 >> 16; | 12101 | crtc->y = src->y1 >> 16; |
12104 | 12102 | ||
12105 | intel_plane->obj = obj; | ||
12106 | |||
12107 | if (intel_crtc->active) { | 12103 | if (intel_crtc->active) { |
12108 | if (state->visible) { | 12104 | if (state->visible) { |
12109 | /* FIXME: kill this fastboot hack */ | 12105 | /* FIXME: kill this fastboot hack */ |
@@ -12367,7 +12363,6 @@ intel_commit_cursor_plane(struct drm_plane *plane, | |||
12367 | struct drm_crtc *crtc = state->base.crtc; | 12363 | struct drm_crtc *crtc = state->base.crtc; |
12368 | struct drm_device *dev = plane->dev; | 12364 | struct drm_device *dev = plane->dev; |
12369 | struct intel_crtc *intel_crtc; | 12365 | struct intel_crtc *intel_crtc; |
12370 | struct intel_plane *intel_plane = to_intel_plane(plane); | ||
12371 | struct drm_i915_gem_object *obj = intel_fb_obj(state->base.fb); | 12366 | struct drm_i915_gem_object *obj = intel_fb_obj(state->base.fb); |
12372 | uint32_t addr; | 12367 | uint32_t addr; |
12373 | 12368 | ||
@@ -12378,8 +12373,6 @@ intel_commit_cursor_plane(struct drm_plane *plane, | |||
12378 | crtc->cursor_x = state->base.crtc_x; | 12373 | crtc->cursor_x = state->base.crtc_x; |
12379 | crtc->cursor_y = state->base.crtc_y; | 12374 | crtc->cursor_y = state->base.crtc_y; |
12380 | 12375 | ||
12381 | intel_plane->obj = obj; | ||
12382 | |||
12383 | if (intel_crtc->cursor_bo == obj) | 12376 | if (intel_crtc->cursor_bo == obj) |
12384 | goto update; | 12377 | goto update; |
12385 | 12378 | ||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 8bb18e507f5f..c06854df466d 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -507,7 +507,6 @@ struct intel_plane { | |||
507 | struct drm_plane base; | 507 | struct drm_plane base; |
508 | int plane; | 508 | int plane; |
509 | enum pipe pipe; | 509 | enum pipe pipe; |
510 | struct drm_i915_gem_object *obj; | ||
511 | bool can_scale; | 510 | bool can_scale; |
512 | int max_downscale; | 511 | int max_downscale; |
513 | 512 | ||
@@ -527,7 +526,6 @@ struct intel_plane { | |||
527 | void (*update_plane)(struct drm_plane *plane, | 526 | void (*update_plane)(struct drm_plane *plane, |
528 | struct drm_crtc *crtc, | 527 | struct drm_crtc *crtc, |
529 | struct drm_framebuffer *fb, | 528 | struct drm_framebuffer *fb, |
530 | struct drm_i915_gem_object *obj, | ||
531 | int crtc_x, int crtc_y, | 529 | int crtc_x, int crtc_y, |
532 | unsigned int crtc_w, unsigned int crtc_h, | 530 | unsigned int crtc_w, unsigned int crtc_h, |
533 | uint32_t x, uint32_t y, | 531 | uint32_t x, uint32_t y, |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index a82873631851..03c2d4c11518 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -179,7 +179,7 @@ static void intel_update_primary_plane(struct intel_crtc *crtc) | |||
179 | static void | 179 | static void |
180 | skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc, | 180 | skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc, |
181 | struct drm_framebuffer *fb, | 181 | struct drm_framebuffer *fb, |
182 | struct drm_i915_gem_object *obj, int crtc_x, int crtc_y, | 182 | int crtc_x, int crtc_y, |
183 | unsigned int crtc_w, unsigned int crtc_h, | 183 | unsigned int crtc_w, unsigned int crtc_h, |
184 | uint32_t x, uint32_t y, | 184 | uint32_t x, uint32_t y, |
185 | uint32_t src_w, uint32_t src_h) | 185 | uint32_t src_w, uint32_t src_h) |
@@ -187,6 +187,7 @@ skl_update_plane(struct drm_plane *drm_plane, struct drm_crtc *crtc, | |||
187 | struct drm_device *dev = drm_plane->dev; | 187 | struct drm_device *dev = drm_plane->dev; |
188 | struct drm_i915_private *dev_priv = dev->dev_private; | 188 | struct drm_i915_private *dev_priv = dev->dev_private; |
189 | struct intel_plane *intel_plane = to_intel_plane(drm_plane); | 189 | struct intel_plane *intel_plane = to_intel_plane(drm_plane); |
190 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | ||
190 | const int pipe = intel_plane->pipe; | 191 | const int pipe = intel_plane->pipe; |
191 | const int plane = intel_plane->plane + 1; | 192 | const int plane = intel_plane->plane + 1; |
192 | u32 plane_ctl, stride_div; | 193 | u32 plane_ctl, stride_div; |
@@ -407,7 +408,7 @@ chv_update_csc(struct intel_plane *intel_plane, uint32_t format) | |||
407 | static void | 408 | static void |
408 | vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc, | 409 | vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc, |
409 | struct drm_framebuffer *fb, | 410 | struct drm_framebuffer *fb, |
410 | struct drm_i915_gem_object *obj, int crtc_x, int crtc_y, | 411 | int crtc_x, int crtc_y, |
411 | unsigned int crtc_w, unsigned int crtc_h, | 412 | unsigned int crtc_w, unsigned int crtc_h, |
412 | uint32_t x, uint32_t y, | 413 | uint32_t x, uint32_t y, |
413 | uint32_t src_w, uint32_t src_h) | 414 | uint32_t src_w, uint32_t src_h) |
@@ -416,6 +417,7 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc, | |||
416 | struct drm_i915_private *dev_priv = dev->dev_private; | 417 | struct drm_i915_private *dev_priv = dev->dev_private; |
417 | struct intel_plane *intel_plane = to_intel_plane(dplane); | 418 | struct intel_plane *intel_plane = to_intel_plane(dplane); |
418 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 419 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
420 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | ||
419 | int pipe = intel_plane->pipe; | 421 | int pipe = intel_plane->pipe; |
420 | int plane = intel_plane->plane; | 422 | int plane = intel_plane->plane; |
421 | u32 sprctl; | 423 | u32 sprctl; |
@@ -608,7 +610,7 @@ vlv_get_colorkey(struct drm_plane *dplane, | |||
608 | static void | 610 | static void |
609 | ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, | 611 | ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, |
610 | struct drm_framebuffer *fb, | 612 | struct drm_framebuffer *fb, |
611 | struct drm_i915_gem_object *obj, int crtc_x, int crtc_y, | 613 | int crtc_x, int crtc_y, |
612 | unsigned int crtc_w, unsigned int crtc_h, | 614 | unsigned int crtc_w, unsigned int crtc_h, |
613 | uint32_t x, uint32_t y, | 615 | uint32_t x, uint32_t y, |
614 | uint32_t src_w, uint32_t src_h) | 616 | uint32_t src_w, uint32_t src_h) |
@@ -617,6 +619,7 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, | |||
617 | struct drm_i915_private *dev_priv = dev->dev_private; | 619 | struct drm_i915_private *dev_priv = dev->dev_private; |
618 | struct intel_plane *intel_plane = to_intel_plane(plane); | 620 | struct intel_plane *intel_plane = to_intel_plane(plane); |
619 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 621 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
622 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | ||
620 | int pipe = intel_plane->pipe; | 623 | int pipe = intel_plane->pipe; |
621 | u32 sprctl, sprscale = 0; | 624 | u32 sprctl, sprscale = 0; |
622 | unsigned long sprsurf_offset, linear_offset; | 625 | unsigned long sprsurf_offset, linear_offset; |
@@ -813,7 +816,7 @@ ivb_get_colorkey(struct drm_plane *plane, struct drm_intel_sprite_colorkey *key) | |||
813 | static void | 816 | static void |
814 | ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, | 817 | ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, |
815 | struct drm_framebuffer *fb, | 818 | struct drm_framebuffer *fb, |
816 | struct drm_i915_gem_object *obj, int crtc_x, int crtc_y, | 819 | int crtc_x, int crtc_y, |
817 | unsigned int crtc_w, unsigned int crtc_h, | 820 | unsigned int crtc_w, unsigned int crtc_h, |
818 | uint32_t x, uint32_t y, | 821 | uint32_t x, uint32_t y, |
819 | uint32_t src_w, uint32_t src_h) | 822 | uint32_t src_w, uint32_t src_h) |
@@ -822,6 +825,7 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, | |||
822 | struct drm_i915_private *dev_priv = dev->dev_private; | 825 | struct drm_i915_private *dev_priv = dev->dev_private; |
823 | struct intel_plane *intel_plane = to_intel_plane(plane); | 826 | struct intel_plane *intel_plane = to_intel_plane(plane); |
824 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 827 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
828 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | ||
825 | int pipe = intel_plane->pipe; | 829 | int pipe = intel_plane->pipe; |
826 | unsigned long dvssurf_offset, linear_offset; | 830 | unsigned long dvssurf_offset, linear_offset; |
827 | u32 dvscntr, dvsscale; | 831 | u32 dvscntr, dvsscale; |
@@ -1275,7 +1279,6 @@ intel_commit_sprite_plane(struct drm_plane *plane, | |||
1275 | struct intel_crtc *intel_crtc; | 1279 | struct intel_crtc *intel_crtc; |
1276 | struct intel_plane *intel_plane = to_intel_plane(plane); | 1280 | struct intel_plane *intel_plane = to_intel_plane(plane); |
1277 | struct drm_framebuffer *fb = state->base.fb; | 1281 | struct drm_framebuffer *fb = state->base.fb; |
1278 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | ||
1279 | int crtc_x, crtc_y; | 1282 | int crtc_x, crtc_y; |
1280 | unsigned int crtc_w, crtc_h; | 1283 | unsigned int crtc_w, crtc_h; |
1281 | uint32_t src_x, src_y, src_w, src_h; | 1284 | uint32_t src_x, src_y, src_w, src_h; |
@@ -1283,8 +1286,7 @@ intel_commit_sprite_plane(struct drm_plane *plane, | |||
1283 | crtc = crtc ? crtc : plane->crtc; | 1286 | crtc = crtc ? crtc : plane->crtc; |
1284 | intel_crtc = to_intel_crtc(crtc); | 1287 | intel_crtc = to_intel_crtc(crtc); |
1285 | 1288 | ||
1286 | plane->fb = state->base.fb; | 1289 | plane->fb = fb; |
1287 | intel_plane->obj = obj; | ||
1288 | 1290 | ||
1289 | if (intel_crtc->active) { | 1291 | if (intel_crtc->active) { |
1290 | intel_crtc->primary_enabled = !state->hides_primary; | 1292 | intel_crtc->primary_enabled = !state->hides_primary; |
@@ -1298,7 +1300,7 @@ intel_commit_sprite_plane(struct drm_plane *plane, | |||
1298 | src_y = state->src.y1; | 1300 | src_y = state->src.y1; |
1299 | src_w = drm_rect_width(&state->src); | 1301 | src_w = drm_rect_width(&state->src); |
1300 | src_h = drm_rect_height(&state->src); | 1302 | src_h = drm_rect_height(&state->src); |
1301 | intel_plane->update_plane(plane, crtc, fb, obj, | 1303 | intel_plane->update_plane(plane, crtc, fb, |
1302 | crtc_x, crtc_y, crtc_w, crtc_h, | 1304 | crtc_x, crtc_y, crtc_w, crtc_h, |
1303 | src_x, src_y, src_w, src_h); | 1305 | src_x, src_y, src_w, src_h); |
1304 | } else { | 1306 | } else { |