Commit 77cde952 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Daniel Vetter

drm/i915: use intel_fb_obj() macros to assign gem objects

Use the macros makes the code cleaner and it also checks for a NULL fb.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 34aa50a9
...@@ -1032,8 +1032,7 @@ intel_check_sprite_plane(struct drm_plane *plane, ...@@ -1032,8 +1032,7 @@ intel_check_sprite_plane(struct drm_plane *plane,
struct intel_crtc *intel_crtc = to_intel_crtc(state->crtc); struct intel_crtc *intel_crtc = to_intel_crtc(state->crtc);
struct intel_plane *intel_plane = to_intel_plane(plane); struct intel_plane *intel_plane = to_intel_plane(plane);
struct drm_framebuffer *fb = state->fb; struct drm_framebuffer *fb = state->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb); struct drm_i915_gem_object *obj = intel_fb_obj(fb);
struct drm_i915_gem_object *obj = intel_fb->obj;
int crtc_x, crtc_y; int crtc_x, crtc_y;
unsigned int crtc_w, crtc_h; unsigned int crtc_w, crtc_h;
uint32_t src_x, src_y, src_w, src_h; uint32_t src_x, src_y, src_w, src_h;
...@@ -1235,9 +1234,8 @@ intel_commit_sprite_plane(struct drm_plane *plane, ...@@ -1235,9 +1234,8 @@ intel_commit_sprite_plane(struct drm_plane *plane,
struct intel_plane *intel_plane = to_intel_plane(plane); struct intel_plane *intel_plane = to_intel_plane(plane);
enum pipe pipe = intel_crtc->pipe; enum pipe pipe = intel_crtc->pipe;
struct drm_framebuffer *fb = state->fb; struct drm_framebuffer *fb = state->fb;
struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb); struct drm_i915_gem_object *obj = intel_fb_obj(fb);
struct drm_i915_gem_object *obj = intel_fb->obj; struct drm_i915_gem_object *old_obj = intel_fb_obj(plane->fb);
struct drm_i915_gem_object *old_obj = intel_plane->obj;
int crtc_x, crtc_y; int crtc_x, crtc_y;
unsigned int crtc_w, crtc_h; unsigned int crtc_w, crtc_h;
uint32_t src_x, src_y, src_w, src_h; uint32_t src_x, src_y, src_w, src_h;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment