Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282510
b: refs/heads/master
c: 62443be
h: refs/heads/master
v: v3
  • Loading branch information
Ville Syrjälä authored and Dave Airlie committed Dec 20, 2011
1 parent 31bc5e1 commit 88fce53
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22cd7c625837e520c94ffda7bc926396bbc4ba67
refs/heads/master: 62443be626a3a753e6c650abd87e8a39fd569d7e
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
struct drm_framebuffer *fb;
int ret = 0;
unsigned int fb_width, fb_height;
int i;

if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;
Expand Down Expand Up @@ -1710,6 +1711,16 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
}
fb = obj_to_fb(obj);

/* Check whether this plane supports the fb pixel format. */
for (i = 0; i < plane->format_count; i++)
if (fb->pixel_format == plane->format_types[i])
break;
if (i == plane->format_count) {
DRM_DEBUG_KMS("Invalid pixel format 0x%08x\n", fb->pixel_format);
ret = -EINVAL;
goto out;
}

fb_width = fb->width << 16;
fb_height = fb->height << 16;

Expand Down

0 comments on commit 88fce53

Please sign in to comment.