On 2019-08-07 10:29 a.m., David Francis wrote:
> This file was accidentally added to the driver during
> Navi promotion
>
> Nothing includes it. No makefile attempts to compile it, and
> it would fail compilation if they tried
>
> Remove it
>
> Signed-off-by: David Francis
Reviewed-by: Harry Wentland
Harry
> ---
> .../gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c | 453 --
> 1 file changed, 453 deletions(-)
> delete mode 100644 drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c
> b/drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c
> deleted file mode 100644
> index fd1fb1653479..
> --- a/drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c
> +++ /dev/null
> @@ -1,453 +0,0 @@
> -// SPDX-License-Identifier: MIT
> -/*
> - * Copyright © 2018 Intel Corp
> - *
> - * Author:
> - * Manasi Navare
> - */
> -
> -/* DC versions of linux includes */
> -#include
> -
> -#define EXPORT_SYMBOL(symbol)/* nothing */
> -#define BUILD_BUG_ON(cond) /* nothing */
> -#define DIV_ROUND_UP(a, b) (((b) + (a) - 1) / (b))
> -#define ERANGE -1
> -#define DRM_DEBUG_KMS(msg) /* nothing */
> -#define cpu_to_be16(__x) little_to_big(__x)
> -#define MAX(x, y)((x) > (y) ? (x) : (y))
> -
> -static unsigned short little_to_big(int data)
> -{
> - /* Swap lower and upper byte. DMCU uses big endian format. */
> - return (0xff & (data >> 8)) + ((data & 0xff) << 8);
> -}
> -
> -/*
> - * Everything below this comment was copied directly from drm_dsc.c.
> - * Only the functions needed in DC are included.
> - * Please keep this file synced with upstream.
> - */
> -
> -/**
> - * DOC: dsc helpers
> - *
> - * These functions contain some common logic and helpers to deal with VESA
> - * Display Stream Compression standard required for DSC on Display Port/eDP
> or
> - * MIPI display interfaces.
> - */
> -
> -/**
> - * drm_dsc_pps_payload_pack() - Populates the DSC PPS
> - *
> - * @pps_payload:
> - * Bitwise struct for DSC Picture Parameter Set. This is defined
> - * by drm_dsc_picture_parameter_set
> - * @dsc_cfg:
> - * DSC Configuration data filled by driver as defined by
> - * drm_dsc_config
> - *
> - * DSC source device sends a picture parameter set (PPS) containing the
> - * information required by the sink to decode the compressed frame. Driver
> - * populates the DSC PPS struct using the DSC configuration parameters in
> - * the order expected by the DSC Display Sink device. For the DSC, the sink
> - * device expects the PPS payload in big endian format for fields
> - * that span more than 1 byte.
> - */
> -void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set
> *pps_payload,
> - const struct drm_dsc_config *dsc_cfg)
> -{
> - int i;
> -
> - /* Protect against someone accidently changing struct size */
> - BUILD_BUG_ON(sizeof(*pps_payload) !=
> - DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 + 1);
> -
> - memset(pps_payload, 0, sizeof(*pps_payload));
> -
> - /* PPS 0 */
> - pps_payload->dsc_version =
> - dsc_cfg->dsc_version_minor |
> - dsc_cfg->dsc_version_major << DSC_PPS_VERSION_MAJOR_SHIFT;
> -
> - /* PPS 1, 2 is 0 */
> -
> - /* PPS 3 */
> - pps_payload->pps_3 =
> - dsc_cfg->line_buf_depth |
> - dsc_cfg->bits_per_component << DSC_PPS_BPC_SHIFT;
> -
> - /* PPS 4 */
> - pps_payload->pps_4 =
> - ((dsc_cfg->bits_per_pixel & DSC_PPS_BPP_HIGH_MASK) >>
> - DSC_PPS_MSB_SHIFT) |
> - dsc_cfg->vbr_enable << DSC_PPS_VBR_EN_SHIFT |
> - dsc_cfg->simple_422 << DSC_PPS_SIMPLE422_SHIFT |
> - dsc_cfg->convert_rgb << DSC_PPS_CONVERT_RGB_SHIFT |
> - dsc_cfg->block_pred_enable << DSC_PPS_BLOCK_PRED_EN_SHIFT;
> -
> - /* PPS 5 */
> - pps_payload->bits_per_pixel_low =
> - (dsc_cfg->bits_per_pixel & DSC_PPS_LSB_MASK);
> -
> - /*
> - * The DSC panel expects the PPS packet to have big endian format
> - * for data spanning 2 bytes. Use a macro cpu_to_be16() to convert
> - * to big endian format. If format is little endian, it will swap
> - * bytes to convert to Big endian else keep it unchanged.
> - */
> -
> - /* PPS 6, 7 */
> - pps_payload->pic_height = cpu_to_be16(dsc_cfg->pic_height);
> -
> - /* PPS 8, 9 */
> - pps_payload->pic_width = cpu_to_be16(dsc_cfg->pic_width);
> -
> - /* PPS 10, 11 */
> - pps_payload->slice_height = cpu_to_be16(dsc_cfg->slice_height);
> -
> - /* PPS 12, 13 */
> - pps_payload->slice_width = cpu_to_be16(dsc_cfg->slice_width);
> -
> - /* PPS 14, 15 */
> - pps_payload->chunk_size = cpu_to_be16(dsc_cfg->slice_chunk_size);
> -
> - /* PPS 16 */
> - pps_payload->initial_xmit_delay_high =
> - ((dsc_cfg->initial_xmit_delay &
> - DSC_PPS_INIT_XMIT_DELAY_HIGH_MASK) >>
> -