drm/i915: Some more fb offsets[] prep stuff
Subsystems (2)
cover drm/i915: Some more fb offsets[] prep stuff
From: Ville Syrjälä <[email protected]>
Yanked a few more prep patches from my earlier fb offsets[] work [1]. First few have r-bs, the rest don't.
The last two patches are new. Things just tickled my OCD a bit too much so had to deal with them.
[1] http://lists.freedesktop.org/archives/intel-gfx/2015-October/078050.html
Ville Syrjälä (8):
drm/i915: Don't leak framebuffer_references if drm_framebuffer_init()
fails
drm/i915: Set i915_ggtt_view_normal type explicitly drm/i915: Pass the dma_addr_t array as const to rotate_pages() drm/i915: Rename the rotated gtt view member to 'rotated' drm/i915: Pass stride to rotate_pages()
drm/i915: Pass rotation_info to intel_rotate_fb_obj_pages() drm/i915: Make display gtt offsets u32
drm/i915: Standardize on 'cpp' for bytes per pixel
drivers/gpu/drm/i915/i915_gem_gtt.c | 22 +++--- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 49 +++++++------- drivers/gpu/drm/i915/intel_drv.h | 12 ++-- drivers/gpu/drm/i915/intel_pm.c | 128 +++++++++++++++++------------------ drivers/gpu/drm/i915/intel_sprite.c | 40 +++++------ 6 files changed, 123 insertions(+), 130 deletions(-)
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/8 drm/i915: Don't leak framebuffer_references if drm_framebuffer_init() fails
From: Ville Syrjälä <[email protected]>
Don't increment obj->framebuffer_references until we know we actually managed to create the framebuffer.
--- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
@@ -14899,7 +14899,6 @@ static int intel_framebuffer_init(struct drm_device *dev,drm_helper_mode_fill_fb_struct (&intel_fb->base, mode_cmd); intel_fb->obj = obj; - intel_fb->obj->framebuffer_references++; ret =drm_framebuffer_init (dev, &intel_fb->base, &intel_fb_funcs);if (ret) {
@@ -14907,6 +14906,8 @@ static int intel_framebuffer_init(struct drm_device *dev,return ret; } + intel_fb->obj->framebuffer_references++; +return 0 ; }
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/8 drm/i915: Set i915_ggtt_view_normal type explicitly
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Just for clarity set the type for i915_ggtt_view_normal explicitly.
While at it fix the indentation fail for i915_ggtt_view_rotated.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +4 -2
@@ -96,9 +96,11 @@static int i915_get_ggtt_vma_pages (struct i915_vma *vma); -const struct i915_ggtt_view i915_ggtt_view_normal; +const struct i915_ggtt_view i915_ggtt_view_normal = { + .type =I915_GGTT_VIEW_NORMAL , +};const struct i915_ggtt_view i915_ggtt_view_rotated = { - .type =I915_GGTT_VIEW_ROTATED + .type =I915_GGTT_VIEW_ROTATED , };static int sanitize_enable_ppgtt (struct drm_device *dev,int enable_ppgtt)
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/8 drm/i915: Pass the dma_addr_t array as const to rotate_pages()
In reply to [email protected]From: Ville Syrjälä <[email protected]>
rotate_pages() doesn't modify the passed in dma addresses, so make them const.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -1
@@ -3331,7 +3331,7 @@ i915_gem_obj_lookup_or_create_ggtt_vma(struct drm_i915_gem_object *obj, }static struct scatterlist * -rotate_pages (dma_addr_t *in,unsigned int offset, +rotate_pages (const dma_addr_t *in,unsigned int offset,unsigned int width,unsigned int height,struct sg_table *st,struct scatterlist *sg) {
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/8 drm/i915: Rename the rotated gtt view member to 'rotated'
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Also rename 'rotation_info' to 'rotated' to match the view type exactly, this should avoid confusion which union members is valid for each view type.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -2
@@ -3366,7 +3366,7 @@ static struct sg_table * intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view, struct drm_i915_gem_object *obj) { - struct intel_rotation_info *rot_info = &ggtt_view->params.rotation_info; + struct intel_rotation_info *rot_info = &ggtt_view->params.rotated;unsigned int size_pages = rot_info->size >>PAGE_SHIFT ;unsigned int size_pages_uv;struct sg_page_iter sg_iter;
@@ -3598,7 +3598,7 @@ i915_ggtt_view_size(struct drm_i915_gem_object *obj,if (view->type ==I915_GGTT_VIEW_NORMAL ) {return obj->base.size; }else if (view->type ==I915_GGTT_VIEW_ROTATED ) { -return view->params.rotation_info.size; +return view->params.rotated.size; }else if (view->type ==I915_GGTT_VIEW_PARTIAL ) {return view->params.partial.size <<PAGE_SHIFT ; }else {
drivers/gpu/drm/i915/i915_gem_gtt.h +1 -1
@@ -156,7 +156,7 @@ struct i915_ggtt_view {u64 offset;unsigned int size; } partial; -struct intel_rotation_info rotation_info; +struct intel_rotation_info rotated; } params;struct sg_table *pages;
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -2290,7 +2290,7 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb, const struct drm_plane_state *plane_state) {struct drm_i915_private *dev_priv =to_i915 (fb->dev); -struct intel_rotation_info *info = &view->params.rotation_info; +struct intel_rotation_info *info = &view->params.rotated;unsigned int tile_size, tile_width, tile_height, cpp; *view = i915_ggtt_view_normal;
@@ -2957,7 +2957,7 @@ u32 intel_plane_obj_offset(struct intel_plane *intel_plane, offset = vma->node.start;if (plane ==1 ) { - offset += vma->ggtt_view.params.rotation_info.uv_start_page * + offset += vma->ggtt_view.params.rotated.uv_start_page *PAGE_SIZE ; }
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/8 drm/i915: Pass stride to rotate_pages()
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Pass stride in addition to width and height to rotate_pages(). For now width and stride are the same, but once framebuffer offsets enter the scene that may no longer be the case.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +5 -2
@@ -3333,6 +3333,7 @@ i915_gem_obj_lookup_or_create_ggtt_vma(struct drm_i915_gem_object *obj,static struct scatterlist *rotate_pages (const dma_addr_t *in,unsigned int offset,unsigned int width,unsigned int height, +unsigned int stride,struct sg_table *st,struct scatterlist *sg) {unsigned int column, row;
@@ -3344,7 +3345,7 @@ rotate_pages(const dma_addr_t *in, unsigned int offset, }for (column =0 ; column < width; column++) { - src_idx = width * (height -1 ) + column; + src_idx = stride * (height -1 ) + column;for (row =0 ; row < height; row++) { st->nents++;/* We don't need the pages, but need to initialize
@@ -3355,7 +3356,7 @@ rotate_pages(const dma_addr_t *in, unsigned int offset,sg_dma_address (sg) = in[offset + src_idx];sg_dma_len (sg) =PAGE_SIZE ; sg =sg_next (sg); - src_idx -= width; + src_idx -= stride; } }
@@ -3408,6 +3409,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,/* Rotate the pages. */ sg =rotate_pages (page_addr_list,0 , rot_info->width_pages, rot_info->height_pages, + rot_info->width_pages, st,NULL );/* Append the UV plane if NV12. */
@@ -3423,6 +3425,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,rotate_pages (page_addr_list, uv_start_page, rot_info->width_pages_uv, rot_info->height_pages_uv, + rot_info->width_pages_uv, st, sg); }
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/8 drm/i915: Pass rotation_info to intel_rotate_fb_obj_pages()
In reply to [email protected]From: Ville Syrjälä <[email protected]>
intel_rotate_fb_obj_pages() doens't need the entire gtt view, just the rotation info suffices.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -3
@@ -3364,10 +3364,9 @@ rotate_pages(const dma_addr_t *in, unsigned int offset, }static struct sg_table * -intel_rotate_fb_obj_pages (struct i915_ggtt_view *ggtt_view, +intel_rotate_fb_obj_pages (struct intel_rotation_info *rot_info,struct drm_i915_gem_object *obj) { -struct intel_rotation_info *rot_info = &ggtt_view->params.rotated;unsigned int size_pages = rot_info->size >>PAGE_SHIFT ;unsigned int size_pages_uv;struct sg_page_iter sg_iter;
@@ -3507,7 +3506,7 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma) vma->ggtt_view.pages = vma->obj->pages; else if (vma->ggtt_view.type == I915_GGTT_VIEW_ROTATED) vma->ggtt_view.pages = -intel_rotate_fb_obj_pages (&vma->ggtt_view, vma->obj); +intel_rotate_fb_obj_pages (&vma->ggtt_view.params.rotated, vma->obj); else if (vma->ggtt_view.type == I915_GGTT_VIEW_PARTIAL) vma->ggtt_view.pages =intel_partial_pages (&vma->ggtt_view, vma->obj);
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/8 drm/i915: Make display gtt offsets u32
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Using 'unsigned long' for ggtt offsets doesn't make much sense. Use 'u32' instead since we've not yet seen a >4GiB ggtt.
--- drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++------------ drivers/gpu/drm/i915/intel_drv.h | 12 ++++++------ drivers/gpu/drm/i915/intel_sprite.c | 6 +++--- 3 files changed, 19 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/intel_display.c +10 -12
@@ -2454,11 +2454,11 @@ static void intel_unpin_fb_obj(struct drm_framebuffer *fb,/* Computes the linear offset to the base tile and adjusts x, y. bytes per pixel * is assumed to be a power-of-two. */ -unsigned long intel_compute_tile_offset (struct drm_i915_private *dev_priv, -int *x,int *y, -uint64_t fb_modifier, -unsigned int cpp, -unsigned int pitch) +u32 intel_compute_tile_offset (struct drm_i915_private *dev_priv, +int *x,int *y, +uint64_t fb_modifier, +unsigned int cpp, +unsigned int pitch) {if (fb_modifier !=DRM_FORMAT_MOD_NONE ) {unsigned int tile_size, tile_width, tile_height;
@@ -2712,14 +2712,12 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,struct drm_framebuffer *fb = plane_state->base.fb;struct drm_i915_gem_object *obj =intel_fb_obj (fb);int plane = intel_crtc->plane; -unsigned long linear_offset; -int x = plane_state->src.x1 >>16 ; -int y = plane_state->src.y1 >>16 ; +u32 linear_offset;u32 dspcntr;i915_reg_t reg =DSPCNTR (plane); -int pixel_size; - - pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int x = plane_state->src.x1 >>16 ; +int y = plane_state->src.y1 >>16 ; dspcntr =DISPPLANE_GAMMA_ENABLE ;
@@ -2845,7 +2843,7 @@ static void ironlake_update_primary_plane(struct drm_plane *primary,struct drm_framebuffer *fb = plane_state->base.fb;struct drm_i915_gem_object *obj =intel_fb_obj (fb);int plane = intel_crtc->plane; -unsigned long linear_offset; +u32 linear_offset;u32 dspcntr;i915_reg_t reg =DSPCNTR (plane);int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 );
drivers/gpu/drm/i915/intel_drv.h +6 -6
@@ -597,7 +597,7 @@ struct intel_crtc {/* Display surface base address adjustement for pageflips. Note that on * gen4+ this only adjusts up to a tile, offsets within a tile are * handled in the hw itself (with the TILEOFF register). */ -unsigned long dspaddr_offset; +u32 dspaddr_offset;int adjusted_x;int adjusted_y;
@@ -1195,11 +1195,11 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,void assert_pipe (struct drm_i915_private *dev_priv,enum pipe pipe,bool state);#define assert_pipe_enabled (d, p) assert_pipe(d, p, true)#define assert_pipe_disabled (d, p) assert_pipe(d, p, false) -unsigned long intel_compute_tile_offset (struct drm_i915_private *dev_priv, -int *x,int *y, -uint64_t fb_modifier, -unsigned int cpp, -unsigned int pitch); +u32 intel_compute_tile_offset (struct drm_i915_private *dev_priv, +int *x,int *y, +uint64_t fb_modifier, +unsigned int cpp, +unsigned int pitch);void intel_prepare_reset (struct drm_device *dev);void intel_finish_reset (struct drm_device *dev);void hsw_enable_pc8 (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/intel_sprite.c +3 -3
@@ -350,7 +350,7 @@ vlv_update_plane(struct drm_plane *dplane,int pipe = intel_plane->pipe;int plane = intel_plane->plane;u32 sprctl; -unsigned long sprsurf_offset, linear_offset; +u32 sprsurf_offset, linear_offset;int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;int crtc_x = plane_state->dst.x1;
@@ -493,7 +493,7 @@ ivb_update_plane(struct drm_plane *plane,struct drm_i915_gem_object *obj =intel_fb_obj (fb);enum pipe pipe = intel_plane->pipe;u32 sprctl, sprscale =0 ; -unsigned long sprsurf_offset, linear_offset; +u32 sprsurf_offset, linear_offset;int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;int crtc_x = plane_state->dst.x1;
@@ -635,8 +635,8 @@ ilk_update_plane(struct drm_plane *plane,struct drm_framebuffer *fb = plane_state->base.fb;struct drm_i915_gem_object *obj =intel_fb_obj (fb);int pipe = intel_plane->pipe; -unsigned long dvssurf_offset, linear_offset;u32 dvscntr, dvsscale; +u32 dvssurf_offset, linear_offset;int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;int crtc_x = plane_state->dst.x1;
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/8] drm/i915: Make display gtt offsets u32
Quoted 4 lines · On Thu, Jan 14, 2016 at 03:22:15PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Using 'unsigned long' for ggtt offsets doesn't make much sense. Use 'u32' instead since we've not yet seen a >4GiB ggtt.
We should do:
drivers/gpu/drm/i915/i915_gem_gtt.c +7 -0
@@ -3143,6 +3143,13 @@ int i915_gem_gtt_init(struct drm_device *dev)if (ret)return ret; +if (gtt->base.total >>32 ) { +DRM_ERROR ("The code does not expect a Global GTT with more that 32bits of address space! Found %lldM!\n" , + gtt->base.total >>20 ); + gtt->base.total =1ull <<32 ; + gtt->mappable_end =min (gtt->mappable_end, gtt->base.total); + } +/* GMADR is the PCI mmio aperture into the global GTT. */ DRM_INFO ("Memory usable by graphics device = %lluM\n" , gtt->base.total >>20 );
To get that early warning in.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
Reviewed-byRe: [PATCH 7/8] drm/i915: Make display gtt offsets u32
Quoted 27 lines · Chris Wilson
Quoted 4 lines · On Thu, Jan 14, 2016 at 03:22:15PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Using 'unsigned long' for ggtt offsets doesn't make much sense. Use 'u32' instead since we've not yet seen a >4GiB ggtt.
We should do:
drivers/gpu/drm/i915/i915_gem_gtt.c +7
-0@@ -3143,6 +3143,13 @@ int i915_gem_gtt_init(struct drm_device *dev)if (ret)return ret; +if (gtt->base.total >>32 ) { +DRM_ERROR ("The code does not expect a Global GTT with more that 32bits of address space! Found %lldM!\n" , + gtt->base.total >>20 ); + gtt->base.total =1ull <<32 ; + gtt->mappable_end =min (gtt->mappable_end, gtt->base.total); + } +/* GMADR is the PCI mmio aperture into the global GTT. */ DRM_INFO ("Memory usable by graphics device = %lluM\n" , gtt->base.total >>20 );
Quoted 1 line
To get that early warning in.
Seems reasonable. Feel free to slap on
Quoted 4 lines
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/8 drm/i915: Standardize on 'cpp' for bytes per pixel
In reply to [email protected]From: Ville Syrjälä <[email protected]>
We more or less randomly call the "bytes per pixel" value 'cpp', 'bytes_per_pixel', 'pixel_size', or even 'bpp'. Let's just pick one and stick to it. I've chosen 'cpp'.
--- drivers/gpu/drm/i915/intel_display.c | 22 +++--- drivers/gpu/drm/i915/intel_pm.c | 128 +++++++++++++++++------------------ drivers/gpu/drm/i915/intel_sprite.c | 34 ++++------ 3 files changed, 87 insertions(+), 97 deletions(-)
drivers/gpu/drm/i915/intel_display.c +11 -11
@@ -2715,7 +2715,7 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,u32 linear_offset;u32 dspcntr;i915_reg_t reg =DSPCNTR (plane); -int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int cpp =drm_format_plane_cpp (fb->pixel_format,0 );int x = plane_state->src.x1 >>16 ;int y = plane_state->src.y1 >>16 ;
@@ -2775,13 +2775,12 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,if (IS_G4X (dev)) dspcntr |=DISPPLANE_TRICKLE_FEED_DISABLE ; - linear_offset = y * fb->pitches[0 ] + x * pixel_size; + linear_offset = y * fb->pitches[0 ] + x * cpp;if (INTEL_INFO (dev)->gen >=4 ) { intel_crtc->dspaddr_offset =intel_compute_tile_offset (dev_priv, &x, &y, - fb->modifier[0 ], - pixel_size, + fb->modifier[0 ], cpp, fb->pitches[0 ]); linear_offset -= intel_crtc->dspaddr_offset; }else {
@@ -2798,7 +2797,7 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,data and adding to linear_offset*/ linear_offset += (crtc_state->pipe_src_h -1 ) * fb->pitches[0 ] + - (crtc_state->pipe_src_w -1 ) * pixel_size; + (crtc_state->pipe_src_w -1 ) * cpp; } intel_crtc->adjusted_x = x;
@@ -2846,7 +2845,7 @@ static void ironlake_update_primary_plane(struct drm_plane *primary,u32 linear_offset;u32 dspcntr;i915_reg_t reg =DSPCNTR (plane); -int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int cpp =drm_format_plane_cpp (fb->pixel_format,0 );int x = plane_state->src.x1 >>16 ;int y = plane_state->src.y1 >>16 ;
@@ -2885,11 +2884,10 @@ static void ironlake_update_primary_plane(struct drm_plane *primary,if (!IS_HASWELL (dev) && !IS_BROADWELL (dev)) dspcntr |=DISPPLANE_TRICKLE_FEED_DISABLE ; - linear_offset = y * fb->pitches[0 ] + x * pixel_size; + linear_offset = y * fb->pitches[0 ] + x * cpp; intel_crtc->dspaddr_offset =intel_compute_tile_offset (dev_priv, &x, &y, - fb->modifier[0 ], - pixel_size, + fb->modifier[0 ], cpp, fb->pitches[0 ]); linear_offset -= intel_crtc->dspaddr_offset;if (plane_state->base.rotation ==BIT (DRM_ROTATE_180 )) {
@@ -2903,7 +2901,7 @@ static void ironlake_update_primary_plane(struct drm_plane *primary,data and adding to linear_offset*/ linear_offset += (crtc_state->pipe_src_h -1 ) * fb->pitches[0 ] + - (crtc_state->pipe_src_w -1 ) * pixel_size; + (crtc_state->pipe_src_w -1 ) * cpp; } }
@@ -14735,10 +14733,12 @@ u32 intel_fb_pitch_limit(struct drm_device *dev, uint64_t fb_modifier,u32 gen =INTEL_INFO (dev)->gen;if (gen >=9 ) { +int cpp =drm_format_plane_cpp (pixel_format,0 ); +/* "The stride in bytes must not exceed the of the size of 8K * pixels and 32K bytes." */ -return min (8192 *drm_format_plane_cpp (pixel_format,0 ),32768 ); +return min (8192 * cpp,32768 ); }else if (gen >=5 && !IS_VALLEYVIEW (dev) && !IS_CHERRYVIEW (dev)) {return 32 *1024 ; }else if (gen >=4 ) {
drivers/gpu/drm/i915/intel_pm.c +62 -66
433 lines not on this page · raw message
drivers/gpu/drm/i915/intel_sprite.c +14 -20
@@ -351,7 +351,7 @@ vlv_update_plane(struct drm_plane *dplane,int plane = intel_plane->plane;u32 sprctl;u32 sprsurf_offset, linear_offset; -int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int cpp =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;int crtc_x = plane_state->dst.x1;int crtc_y = plane_state->dst.y1;
@@ -422,10 +422,9 @@ vlv_update_plane(struct drm_plane *dplane, crtc_w--; crtc_h--; - linear_offset = y * fb->pitches[0 ] + x * pixel_size; + linear_offset = y * fb->pitches[0 ] + x * cpp; sprsurf_offset =intel_compute_tile_offset (dev_priv, &x, &y, - fb->modifier[0 ], - pixel_size, + fb->modifier[0 ], cpp, fb->pitches[0 ]); linear_offset -= sprsurf_offset;
@@ -434,7 +433,7 @@ vlv_update_plane(struct drm_plane *dplane, x += src_w; y += src_h; - linear_offset += src_h * fb->pitches[0 ] + src_w * pixel_size; + linear_offset += src_h * fb->pitches[0 ] + src_w * cpp; }if (key->flags) {
@@ -494,7 +493,7 @@ ivb_update_plane(struct drm_plane *plane,enum pipe pipe = intel_plane->pipe;u32 sprctl, sprscale =0 ;u32 sprsurf_offset, linear_offset; -int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int cpp =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;int crtc_x = plane_state->dst.x1;int crtc_y = plane_state->dst.y1;
@@ -556,10 +555,9 @@ ivb_update_plane(struct drm_plane *plane,if (crtc_w != src_w || crtc_h != src_h) sprscale =SPRITE_SCALE_ENABLE | (src_w <<16 ) | src_h; - linear_offset = y * fb->pitches[0 ] + x * pixel_size; + linear_offset = y * fb->pitches[0 ] + x * cpp; sprsurf_offset =intel_compute_tile_offset (dev_priv, &x, &y, - fb->modifier[0 ], - pixel_size, + fb->modifier[0 ], cpp, fb->pitches[0 ]); linear_offset -= sprsurf_offset;
@@ -570,8 +568,7 @@ ivb_update_plane(struct drm_plane *plane,if (!IS_HASWELL (dev) && !IS_BROADWELL (dev)) { x += src_w; y += src_h; - linear_offset += src_h * fb->pitches[0 ] + - src_w * pixel_size; + linear_offset += src_h * fb->pitches[0 ] + src_w * cpp; } }
@@ -637,7 +634,7 @@ ilk_update_plane(struct drm_plane *plane,int pipe = intel_plane->pipe;u32 dvscntr, dvsscale;u32 dvssurf_offset, linear_offset; -int pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); +int cpp =drm_format_plane_cpp (fb->pixel_format,0 );const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;int crtc_x = plane_state->dst.x1;int crtc_y = plane_state->dst.y1;
@@ -695,10 +692,9 @@ ilk_update_plane(struct drm_plane *plane,if (crtc_w != src_w || crtc_h != src_h) dvsscale =DVS_SCALE_ENABLE | (src_w <<16 ) | src_h; - linear_offset = y * fb->pitches[0 ] + x * pixel_size; + linear_offset = y * fb->pitches[0 ] + x * cpp; dvssurf_offset =intel_compute_tile_offset (dev_priv, &x, &y, - fb->modifier[0 ], - pixel_size, + fb->modifier[0 ], cpp, fb->pitches[0 ]); linear_offset -= dvssurf_offset;
@@ -707,7 +703,7 @@ ilk_update_plane(struct drm_plane *plane, x += src_w; y += src_h; - linear_offset += src_h * fb->pitches[0 ] + src_w * pixel_size; + linear_offset += src_h * fb->pitches[0 ] + src_w * cpp; }if (key->flags) {
@@ -772,7 +768,6 @@ intel_check_sprite_plane(struct drm_plane *plane,int hscale, vscale;int max_scale, min_scale;bool can_scale; -int pixel_size;if (!fb) { state->visible = false;
@@ -894,6 +889,7 @@ intel_check_sprite_plane(struct drm_plane *plane,/* Check size restrictions when scaling */ if (state->visible && (src_w != crtc_w || src_h != crtc_h)) {unsigned int width_bytes; +int cpp =drm_format_plane_cpp (fb->pixel_format,0 );WARN_ON (!can_scale);
@@ -905,9 +901,7 @@ intel_check_sprite_plane(struct drm_plane *plane,if (src_w <3 || src_h <3 ) state->visible = false; - pixel_size =drm_format_plane_cpp (fb->pixel_format,0 ); - width_bytes = ((src_x * pixel_size) &63 ) + - src_w * pixel_size; + width_bytes = ((src_x * cpp) &63 ) + src_w * cpp;if (INTEL_INFO (dev)->gen <9 && (src_w >2048 || src_h >2048 || width_bytes >4096 || fb->pitches[0 ] >4096 )) {
Signature · 6 lines
2.4.10 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ failure: Fi.CI.BAT
In reply to [email protected]== Summary ==
== Summary ==
Built on 8fb2feecca499d11e104264071ac55e273e23af5 drm-intel-nightly: 2016y-01m-14d-13h-06m-44s UTC integration manifest
Test gem_ctx_basic:
pass -> FAIL (bdw-ultra)
Test gem_storedw_loop:
Subgroup basic-render:
dmesg-warn -> PASS (bdw-nuci7)
dmesg-warn -> PASS (bdw-ultra)bdw-nuci7 total:138 pass:129 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:138 pass:131 dwarn:0 dfail:0 fail:1 skip:6 bsw-nuc-2 total:141 pass:115 dwarn:2 dfail:0 fail:0 skip:24 hsw-brixbox total:141 pass:134 dwarn:0 dfail:0 fail:0 skip:7 hsw-gt2 total:141 pass:137 dwarn:0 dfail:0 fail:0 skip:4 ilk-hp8440p total:141 pass:101 dwarn:3 dfail:0 fail:0 skip:37 ivb-t430s total:135 pass:122 dwarn:3 dfail:4 fail:0 skip:6 skl-i5k-2 total:141 pass:131 dwarn:2 dfail:0 fail:0 skip:8 snb-dellxps total:141 pass:122 dwarn:5 dfail:0 fail:0 skip:14 snb-x220t total:141 pass:122 dwarn:5 dfail:0 fail:1 skip:13
Results at /archive/results/CI_IGT_test/Patchwork_1188/
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ failure: Fi.CI.BAT
Quoted 6 lines · Patchwork
== Summary ==
Built on
8fb2feecca499d11e104264071ac55e273e23af5drm-intel-nightly: 2016y-01m-14d-13h-06m-44s UTC integration manifestTest
gem_ctx_basic:pass -> FAIL (bdw-ultra)
"Returncode -15" and nothing more. Weird.
Quoted 17 lines
Test
gem_storedw_loop:Subgroup basic-render: dmesg-warn -> PASS (bdw-nuci7) dmesg-warn -> PASS (bdw-ultra)bdw-nuci7 total:138 pass:129 dwarn:0 dfail:0 fail:0 skip:9 bdw-ultra total:138 pass:131 dwarn:0 dfail:0 fail:1 skip:6 bsw-nuc-2 total:141 pass:115 dwarn:2 dfail:0 fail:0 skip:24 hsw-brixbox total:141 pass:134 dwarn:0 dfail:0 fail:0 skip:7 hsw-gt2 total:141 pass:137 dwarn:0 dfail:0 fail:0 skip:4 ilk-hp8440p total:141 pass:101 dwarn:3 dfail:0 fail:0 skip:37 ivb-t430s total:135 pass:122 dwarn:3 dfail:4 fail:0 skip:6 skl-i5k-2 total:141 pass:131 dwarn:2 dfail:0 fail:0 skip:8 snb-dellxps total:141 pass:122 dwarn:5 dfail:0 fail:0 skip:14 snb-x220t total:141 pass:122 dwarn:5 dfail:0 fail:1 skip:13Results at /archive/results/CI_IGT_test/Patchwork_1188/
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ failure: Fi.CI.BAT
Quoted 9 lines · Ville Syrjälä
Quoted 6 lines · Patchwork
== Summary ==
Built on
8fb2feecca499d11e104264071ac55e273e23af5drm-intel-nightly: 2016y-01m-14d-13h-06m-44s UTC integration manifestTest
gem_ctx_basic:pass -> FAIL (bdw-ultra)"Returncode -15" and nothing more. Weird.
Strikes me as a bug in the testrunner. That's not one of ours. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · On Thu, Jan 14, 2016 at 03:22:08PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Yanked a few more prep patches from my earlier fb offsets[] work [1]. First few have r-bs, the rest don't.
The last two patches are new. Things just tickled my OCD a bit too much so had to deal with them.
Quoted 7 lines
[1] http://lists.freedesktop.org/archives/intel-gfx/2015-October/078050.html
Ville Syrjälä (8):
drm/i915: Don't leakframebuffer_referencesifdrm_framebuffer_init()
fails
drm/i915: Seti915_ggtt_view_normaltype explicitly drm/i915: Pass thedma_addr_tarray as const torotate_pages()
These first three had r-bs already, so I went and pushed them to dinq. Thanks for the reviews.
Quoted 16 lines
drm/i915: Rename the rotated gtt view member to 'rotated' drm/i915: Pass stride to
rotate_pages()
drm/i915: Passrotation_infotointel_rotate_fb_obj_pages()drm/i915: Make display gtt offsets u32
drm/i915: Standardize on 'cpp' for bytes per pixeldrivers/gpu/drm/i915/i915_gem_gtt.c | 22 +++--- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 49 +++++++------- drivers/gpu/drm/i915/intel_drv.h | 12 ++-- drivers/gpu/drm/i915/intel_pm.c | 128 +++++++++++++++++------------------ drivers/gpu/drm/i915/intel_sprite.c | 40 +++++------ 6 files changed, 123 insertions(+), 130 deletions(-)Signature · 1 line
2.4.10
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx