From patchwork Tue Nov 19 14:41:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 11252257 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 4C32514C0 for ; Tue, 19 Nov 2019 14:47:36 +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 34835222DC for ; Tue, 19 Nov 2019 14:47:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34835222DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synopsys.com 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 345D86E060; Tue, 19 Nov 2019 14:47:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [198.182.47.102]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3DC2D6E8C0 for ; Tue, 19 Nov 2019 14:47:30 +0000 (UTC) Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id D2D53C2577; Tue, 19 Nov 2019 14:41:55 +0000 (UTC) Received: from paltsev-e7480.internal.synopsys.com (paltsev-e7480.internal.synopsys.com [10.121.3.76]) by mailhost.synopsys.com (Postfix) with ESMTP id A75AEA0069; Tue, 19 Nov 2019 14:41:53 +0000 (UTC) From: Eugeniy Paltsev To: dri-devel@lists.freedesktop.org, Alexey Brodkin Subject: [PATCH 3/4] DRM: ARC: PGU: replace unsupported by HW RGB888 format by XRGB888 Date: Tue, 19 Nov 2019 17:41:46 +0300 Message-Id: <20191119144147.8022-4-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191119144147.8022-1-Eugeniy.Paltsev@synopsys.com> References: <20191119144147.8022-1-Eugeniy.Paltsev@synopsys.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1574174517; bh=y/UJ6x3VYOJt5fIAD/1jTDgF9YTH0srcaXkWR4OGbd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPtTti2LVDPM9DgKHzdr1nFE/0ZhNsu3lkSW1EvgO3qMMEaJ2jmBoYY+fZOcw3wet 4EdJL/drirgbr5SPdnJATxMYvflcxei+311eYSEc1UqC+D4yqpKCOi/nGKgkhdq6NB u16RzcMaAu74XfVgGrgBi6L0/aE1I0JifzdswhnSTiI0o8P5Wx5USGSFXMu4s4BH6R 3A8bzMEHS+c4px5RSnAnQ6d/OvzSX7T6t1HT0ObSi+yW3kRMRWeZXOr77t34lyHQGI aTJoi/sgyKANCULKv+0SvFWR9C2CVac6GPcWSdwoWLaDKWx6AYlA4glo4Jdv/4cjyv gn9EB64ZGggFw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-snps-arc@lists.infradead.org, Eugeniy Paltsev , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ARC PGU doesn't support RGB888 (24 bit) format but supports XRGB888 (32 bit) format. Fix incorrect format list in a driver. Signed-off-by: Eugeniy Paltsev --- drivers/gpu/drm/arc/arcpgu_crtc.c | 6 +++--- drivers/gpu/drm/arc/arcpgu_regs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c index 5473b19a52ee..980e00180e6f 100644 --- a/drivers/gpu/drm/arc/arcpgu_crtc.c +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c @@ -22,7 +22,7 @@ static const u32 arc_pgu_supported_formats[] = { DRM_FORMAT_RGB565, - DRM_FORMAT_RGB888, + DRM_FORMAT_XRGB8888, }; static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc) @@ -44,9 +44,9 @@ static void arc_pgu_set_pxl_fmt(struct drm_crtc *crtc) reg_ctrl = arc_pgu_read(arcpgu, ARCPGU_REG_CTRL); if (format == DRM_FORMAT_RGB565) - reg_ctrl &= ~ARCPGU_MODE_RGB888_MASK; + reg_ctrl &= ~ARCPGU_MODE_XRGB8888; else - reg_ctrl |= ARCPGU_MODE_RGB888_MASK; + reg_ctrl |= ARCPGU_MODE_XRGB8888; arc_pgu_write(arcpgu, ARCPGU_REG_CTRL, reg_ctrl); } diff --git a/drivers/gpu/drm/arc/arcpgu_regs.h b/drivers/gpu/drm/arc/arcpgu_regs.h index dab2c380f7f3..b689a382d556 100644 --- a/drivers/gpu/drm/arc/arcpgu_regs.h +++ b/drivers/gpu/drm/arc/arcpgu_regs.h @@ -25,7 +25,7 @@ #define ARCPGU_CTRL_VS_POL_OFST 0x3 #define ARCPGU_CTRL_HS_POL_MASK 0x1 #define ARCPGU_CTRL_HS_POL_OFST 0x4 -#define ARCPGU_MODE_RGB888_MASK 0x04 +#define ARCPGU_MODE_XRGB8888 BIT(2) #define ARCPGU_STAT_BUSY_MASK 0x02 #endif