diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-20 14:05:25 -0500 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-28 13:56:38 -0500 |
commit | 54ea9da88fc89bbba0c2f888bdb265d9fd6a3945 (patch) | |
tree | 570378214d0b202c324be1c4f8c90c0227360608 /drivers/gpu/drm/i915/intel_display.c | |
parent | 11d23e6fa186f91cc6b1ccf27bbb14810c9baefe (diff) |
drm/i915: Make display gtt offsets u32
Using 'unsigned long' for ggtt offsets doesn't make much sense. Use
'u32' instead since we've not yet seen a >4GiB ggtt.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453316739-13296-5-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f54e11922353..97af94a12960 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2448,11 +2448,11 @@ static void intel_unpin_fb_obj(struct drm_framebuffer *fb, | |||
2448 | 2448 | ||
2449 | /* Computes the linear offset to the base tile and adjusts x, y. bytes per pixel | 2449 | /* Computes the linear offset to the base tile and adjusts x, y. bytes per pixel |
2450 | * is assumed to be a power-of-two. */ | 2450 | * is assumed to be a power-of-two. */ |
2451 | unsigned long intel_compute_tile_offset(struct drm_i915_private *dev_priv, | 2451 | u32 intel_compute_tile_offset(struct drm_i915_private *dev_priv, |
2452 | int *x, int *y, | 2452 | int *x, int *y, |
2453 | uint64_t fb_modifier, | 2453 | uint64_t fb_modifier, |
2454 | unsigned int cpp, | 2454 | unsigned int cpp, |
2455 | unsigned int pitch) | 2455 | unsigned int pitch) |
2456 | { | 2456 | { |
2457 | if (fb_modifier != DRM_FORMAT_MOD_NONE) { | 2457 | if (fb_modifier != DRM_FORMAT_MOD_NONE) { |
2458 | unsigned int tile_size, tile_width, tile_height; | 2458 | unsigned int tile_size, tile_width, tile_height; |
@@ -2706,14 +2706,12 @@ static void i9xx_update_primary_plane(struct drm_plane *primary, | |||
2706 | struct drm_framebuffer *fb = plane_state->base.fb; | 2706 | struct drm_framebuffer *fb = plane_state->base.fb; |
2707 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | 2707 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); |
2708 | int plane = intel_crtc->plane; | 2708 | int plane = intel_crtc->plane; |
2709 | unsigned long linear_offset; | 2709 | u32 linear_offset; |
2710 | int x = plane_state->src.x1 >> 16; | ||
2711 | int y = plane_state->src.y1 >> 16; | ||
2712 | u32 dspcntr; | 2710 | u32 dspcntr; |
2713 | i915_reg_t reg = DSPCNTR(plane); | 2711 | i915_reg_t reg = DSPCNTR(plane); |
2714 | int pixel_size; | 2712 | int pixel_size = drm_format_plane_cpp(fb->pixel_format, 0); |
2715 | 2713 | int x = plane_state->src.x1 >> 16; | |
2716 | pixel_size = drm_format_plane_cpp(fb->pixel_format, 0); | 2714 | int y = plane_state->src.y1 >> 16; |
2717 | 2715 | ||
2718 | dspcntr = DISPPLANE_GAMMA_ENABLE; | 2716 | dspcntr = DISPPLANE_GAMMA_ENABLE; |
2719 | 2717 | ||
@@ -2839,7 +2837,7 @@ static void ironlake_update_primary_plane(struct drm_plane *primary, | |||
2839 | struct drm_framebuffer *fb = plane_state->base.fb; | 2837 | struct drm_framebuffer *fb = plane_state->base.fb; |
2840 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); | 2838 | struct drm_i915_gem_object *obj = intel_fb_obj(fb); |
2841 | int plane = intel_crtc->plane; | 2839 | int plane = intel_crtc->plane; |
2842 | unsigned long linear_offset; | 2840 | u32 linear_offset; |
2843 | u32 dspcntr; | 2841 | u32 dspcntr; |
2844 | i915_reg_t reg = DSPCNTR(plane); | 2842 | i915_reg_t reg = DSPCNTR(plane); |
2845 | int pixel_size = drm_format_plane_cpp(fb->pixel_format, 0); | 2843 | int pixel_size = drm_format_plane_cpp(fb->pixel_format, 0); |