Commit d54465bd authored by Guido Gunther's avatar Guido Gunther Committed by Angus Ainslie (Purism)

drm: imx: Trivial cleanups

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 6bd395c2
// SPDX-License-Identifier: GPL-2.0+
/*
* Freescale i.MX drm driver
*
* Copyright (C) 2011 Sascha Hauer, Pengutronix
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <linux/component.h>
#include <linux/device.h>
......@@ -21,12 +12,10 @@
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_of.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_of.h>
#include <video/imx-ipu-v3.h>
#include <video/imx-dcss.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _IMX_DRM_H_
#define _IMX_DRM_H_
......
......@@ -621,9 +621,10 @@ void dcss_dpr_format_set(struct dcss_soc *dcss, int ch_num, u32 pix_format,
struct dcss_dpr_ch *ch = &dcss->dpr_priv->ch[ch_num];
enum dcss_color_space dcss_cs;
struct drm_format_name_buf name_buf;
const struct drm_format_info *info = drm_format_info(pix_format);
dcss_cs = dcss_drm_fourcc_to_colorspace(pix_format);
ch->planes = drm_format_num_planes(pix_format);
ch->planes = info->num_planes;
ch->bpp = dcss_dpr_get_bpp(pix_format);
ch->pix_format = pix_format;
ch->use_dtrc = ch_num && modifiers_present;
......
......@@ -594,7 +594,6 @@ void dcss_scaler_setup(struct dcss_soc *dcss, int ch_num, u32 pix_format,
{
struct dcss_scaler_ch *ch = &dcss->scaler_priv->ch[ch_num];
enum dcss_color_space dcss_cs;
int planes;
unsigned int pixel_depth;
bool rtr_8line_en = false;
u32 bpp;
......@@ -603,8 +602,6 @@ void dcss_scaler_setup(struct dcss_soc *dcss, int ch_num, u32 pix_format,
bool wrscl_needed = false;
dcss_cs = dcss_drm_fourcc_to_colorspace(pix_format);
planes = drm_format_num_planes(pix_format);
if (dcss_cs == DCSS_COLORSPACE_YUV) {
dcss_scaler_yuv_enable(dcss, ch_num, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment