Quoting Ville Syrjala (2018-09-13 21:01:38) > +static void > +intel_plane_remap_gtt(struct intel_plane_state *plane_state) > +{ > + struct drm_i915_private *dev_priv = > + to_i915(plane_state->base.plane->dev); > + struct drm_framebuffer *fb = plane_state->base.fb; > + struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb); > + struct intel_rotation_info *info = &plane_state->view.rotated; > + unsigned int rotation = plane_state->base.rotation; > + int i, num_planes = fb->format->num_planes; > + unsigned int tile_size = intel_tile_size(dev_priv); > + unsigned int tile_width, tile_height; > + unsigned int aligned_x, aligned_y; > + unsigned int aligned_w, aligned_h; > + unsigned int src_x, src_y; > + unsigned int src_w, src_h; > + unsigned int x, y; > + u32 gtt_offset = 0; > + > + memset(&plane_state->view, 0, sizeof(plane_state->view)); > + plane_state->view.type = drm_rotation_90_or_270(rotation) ? > + I915_GGTT_VIEW_ROTATED : I915_GGTT_VIEW_REMAPPED; > + > + src_x = plane_state->base.src.x1 >> 16; > + src_y = plane_state->base.src.y1 >> 16; > + src_w = drm_rect_width(&plane_state->base.src) >> 16; > + src_h = drm_rect_height(&plane_state->base.src) >> 16; Just doing a quick exercise to see if we might overflow later. src_w/src_h are 15 bits (int 31 bits >> 16). So size is 30 bits and total size of planes[2], 31 bits. (I'm assuming we go in and out of pages.) Did I miss anything? Should I be asking "what about the overflow?" :) -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx