Skip to content

Commit

Permalink
drm/tilcdc: Remove tilcdc_verify_fb()
Browse files Browse the repository at this point in the history
commit c72cc66 upstream.

Remove tilcdc_verify_fb(). The tilcdc_verify_fb() function is not
needed because the same checks are implemented in
tilcdc_plane_atomic_check().

Signed-off-by: Jyri Sarha <[email protected]>
  • Loading branch information
Jyri Sarha committed Aug 17, 2016
1 parent ebbd1c9 commit db464d1
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions drivers/gpu/drm/tilcdc/tilcdc_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,36 +151,15 @@ static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
drm_flip_work_cleanup(&tilcdc_crtc->unref_work);
}

static int tilcdc_verify_fb(struct drm_crtc *crtc, struct drm_framebuffer *fb)
{
struct drm_device *dev = crtc->dev;
unsigned int depth, bpp;

drm_fb_get_bpp_depth(fb->pixel_format, &depth, &bpp);

if (fb->pitches[0] != crtc->mode.hdisplay * bpp / 8) {
dev_err(dev->dev,
"Invalid pitch: fb and crtc widths must be the same");
return -EINVAL;
}

return 0;
}

int tilcdc_crtc_page_flip(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
struct drm_pending_vblank_event *event,
uint32_t page_flip_flags)
{
struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
struct drm_device *dev = crtc->dev;
int r;
unsigned long flags;

r = tilcdc_verify_fb(crtc, fb);
if (r)
return r;

if (tilcdc_crtc->event) {
dev_err(dev->dev, "already pending page flip!\n");
return -EBUSY;
Expand Down

0 comments on commit db464d1

Please sign in to comment.