From patchwork Mon Oct 12 10:25:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 11835063 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0263D109B for ; Tue, 13 Oct 2020 07:17:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D43A6207C3 for ; Tue, 13 Oct 2020 07:17:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D43A6207C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=crapouillou.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 354AD6E896; Tue, 13 Oct 2020 07:17:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from aposti.net (aposti.net [89.234.176.197]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7598A6E24D; Mon, 12 Oct 2020 10:25:21 +0000 (UTC) From: Paul Cercueil To: Stephen Rothwell Subject: [PATCH] drm/ingenic: Fix bad revert Date: Mon, 12 Oct 2020 12:25:09 +0200 Message-Id: <20201012102509.10690-1-paul@crapouillou.net> In-Reply-To: <20201012152452.432c4867@canb.auug.org.au> References: <20201012152452.432c4867@canb.auug.org.au> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 13 Oct 2020 07:16:53 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics , Linux Kernel Mailing List , DRI , Paul Cercueil , linux-next@vger.kernel.org, Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix a badly reverted commit. The revert commit was cherry-picked from drm-misc-next to drm-misc-next-fixes, and in the process some unrelated code was added. Fixes: a3fb64c00d44 "Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"" Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 1be1235bd546..a3d1617d7c67 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -440,20 +440,6 @@ void ingenic_drm_plane_config(struct device *dev, } } -static void ingenic_drm_update_palette(struct ingenic_drm *priv, - const struct drm_color_lut *lut) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(priv->dma_hwdescs->palette); i++) { - u16 color = drm_color_lut_extract(lut[i].red, 5) << 11 - | drm_color_lut_extract(lut[i].green, 6) << 5 - | drm_color_lut_extract(lut[i].blue, 5); - - priv->dma_hwdescs->palette[i] = color; - } -} - static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, struct drm_plane_state *oldstate) { @@ -464,8 +450,6 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, dma_addr_t addr; if (state && state->fb) { - crtc_state = state->crtc->state; - addr = drm_fb_cma_get_gem_addr(state->fb, state, 0); width = state->src_w >> 16; height = state->src_h >> 16;