mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
drm: Print the fb dimensions when the src coord check fails
When debugging bad plane source coordinates it helps to have an idea of what the framebuffer dimensions are. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171101183533.28466-1-ville.syrjala@linux.intel.com
This commit is contained in:
parent
0a2adb02d7
commit
0338f0d0d7
2 changed files with 6 additions and 4 deletions
|
@ -907,11 +907,12 @@ static int drm_atomic_plane_check(struct drm_plane *plane,
|
||||||
state->src_h > fb_height ||
|
state->src_h > fb_height ||
|
||||||
state->src_y > fb_height - state->src_h) {
|
state->src_y > fb_height - state->src_h) {
|
||||||
DRM_DEBUG_ATOMIC("Invalid source coordinates "
|
DRM_DEBUG_ATOMIC("Invalid source coordinates "
|
||||||
"%u.%06ux%u.%06u+%u.%06u+%u.%06u\n",
|
"%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n",
|
||||||
state->src_w >> 16, ((state->src_w & 0xffff) * 15625) >> 10,
|
state->src_w >> 16, ((state->src_w & 0xffff) * 15625) >> 10,
|
||||||
state->src_h >> 16, ((state->src_h & 0xffff) * 15625) >> 10,
|
state->src_h >> 16, ((state->src_h & 0xffff) * 15625) >> 10,
|
||||||
state->src_x >> 16, ((state->src_x & 0xffff) * 15625) >> 10,
|
state->src_x >> 16, ((state->src_x & 0xffff) * 15625) >> 10,
|
||||||
state->src_y >> 16, ((state->src_y & 0xffff) * 15625) >> 10);
|
state->src_y >> 16, ((state->src_y & 0xffff) * 15625) >> 10,
|
||||||
|
state->fb->width, state->fb->height);
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,11 +78,12 @@ int drm_framebuffer_check_src_coords(uint32_t src_x, uint32_t src_y,
|
||||||
src_h > fb_height ||
|
src_h > fb_height ||
|
||||||
src_y > fb_height - src_h) {
|
src_y > fb_height - src_h) {
|
||||||
DRM_DEBUG_KMS("Invalid source coordinates "
|
DRM_DEBUG_KMS("Invalid source coordinates "
|
||||||
"%u.%06ux%u.%06u+%u.%06u+%u.%06u\n",
|
"%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n",
|
||||||
src_w >> 16, ((src_w & 0xffff) * 15625) >> 10,
|
src_w >> 16, ((src_w & 0xffff) * 15625) >> 10,
|
||||||
src_h >> 16, ((src_h & 0xffff) * 15625) >> 10,
|
src_h >> 16, ((src_h & 0xffff) * 15625) >> 10,
|
||||||
src_x >> 16, ((src_x & 0xffff) * 15625) >> 10,
|
src_x >> 16, ((src_x & 0xffff) * 15625) >> 10,
|
||||||
src_y >> 16, ((src_y & 0xffff) * 15625) >> 10);
|
src_y >> 16, ((src_y & 0xffff) * 15625) >> 10,
|
||||||
|
fb->width, fb->height);
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue