Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c72cc663 authored by Jyri Sarha's avatar Jyri Sarha
Browse files

drm/tilcdc: Remove tilcdc_verify_fb()



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: default avatarJyri Sarha <jsarha@ti.com>
parent 6b4736db
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -151,22 +151,6 @@ 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,
@@ -174,13 +158,8 @@ int tilcdc_crtc_page_flip(struct drm_crtc *crtc,
{
	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;