Unverified Commit b0f986b4 authored by Maxime Ripard's avatar Maxime Ripard
Browse files

drm: Remove users of drm_format_info_plane_cpp



drm_format_info_plane_cpp() basically just returns the cpp array content
found in the drm_format_info structure.

Since it's pretty trivial, let's remove the function and have the users use
the array directly

Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c0a78c87cd0410a1819edad2794ad06543c85bb5.1558002671.git-series.maxime.ripard@bootlin.com
parent 92f08076
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
	u32 cpp;

	info = drm_get_format_info(adev->ddev, mode_cmd);
	cpp = drm_format_info_plane_cpp(info, 0);
	cpp = info->cpp[0];

	/* need to align pitch with crtc limits */
	mode_cmd->pitches[0] = amdgpu_align_pitch(adev, mode_cmd->width, cpp,
+1 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode *
int malidp_format_get_bpp(u32 fmt)
{
	const struct drm_format_info *info = drm_format_info(fmt);
	int bpp = drm_format_info_plane_cpp(info, 0) * 8;
	int bpp = info->cpp[0] * 8;

	if (bpp == 0) {
		switch (fmt) {
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ bool malidp_format_mod_supported(struct drm_device *drm,

	if (modifier & AFBC_SPLIT) {
		if (!info->is_yuv) {
			if (drm_format_info_plane_cpp(info, 0) <= 2) {
			if (info->cpp[0] <= 2) {
				DRM_DEBUG_KMS("RGB formats <= 16bpp are not supported with SPLIT\n");
				return false;
			}
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u

	dumb_args.width = width;
	dumb_args.height = height;
	dumb_args.bpp = drm_format_info_plane_cpp(info, 0) * 8;
	dumb_args.bpp = info->cpp[0] * 8;
	ret = drm_mode_create_dumb(dev, &dumb_args, client->file);
	if (ret)
		goto err_delete;
+1 −1
Original line number Diff line number Diff line
@@ -813,7 +813,7 @@ static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper *fb_helper,
					  struct drm_clip_rect *clip)
{
	struct drm_framebuffer *fb = fb_helper->fb;
	unsigned int cpp = drm_format_info_plane_cpp(fb->format, 0);
	unsigned int cpp = fb->format->cpp[0];
	size_t offset = clip->y1 * fb->pitches[0] + clip->x1 * cpp;
	void *src = fb_helper->fbdev->screen_buffer + offset;
	void *dst = fb_helper->buffer->vaddr + offset;
Loading