Received: by 10.213.65.68 with SMTP id h4csp4239239imn; Tue, 10 Apr 2018 11:29:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nmefll2hxK5UxriCt/ZPJXLs9og4CpF7dyhR5KVfIDOAGHosI6qZOehoAxr3LGwfP7Wvm X-Received: by 2002:a17:902:9892:: with SMTP id s18-v6mr1540735plp.95.1523384972023; Tue, 10 Apr 2018 11:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523384971; cv=none; d=google.com; s=arc-20160816; b=boDybe6a5cyiLDIVFvxKqesYJ/JQgm3QE16YBtHKInaZkJN5J84FXOMQgKtR/pvHcw aIam0R/a+feeNbcVQLzeWnJmsJ1LEMgy70vYa9fI7hiLMRFxHcjxaswdaWYij1VK2gIF MlUPg4He6t4MLQHapW3aCnQOT0ZfWNmsp8y6oC8kwsV9kbf9k7mZD0wQ1tpgtoRY9PsK x5pimZWAY6QUEi/G97vhCDT78KjQ309ullpop91S69Ie+hI2CmPgComQ8xwsTg+/3L5m Aiomb2GtV9kJ20LtJOdjo5EToiwgG/ju9LPaZAlBR5iIfzk6S0brDvDjQkmuVk9DdsB/ YSsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:nodisclaimer:mime-version:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=avgHVVnINd4+TWutjvJEH+gwtukuciQHRdqZaksGIgI=; b=miV3PitxevOlp7ZP4Ma4eFYh6ACElkXHKEfkwbkarHyQF8FxfbkWHUjk7c6qp87bLp N0LcF90wqQGVLbF/mGBhfpapPdXW7b/9WqDcbg4dW/Lzj8GXtXiP4wMlnCaMK360vhrw iXLGLFA9dydfuSWZ80LrjFEniHC44cKuG1lsLhKt7dt4UBzOztCt7Rm8mg3XiMCoH5lL G2yju4Gnm3VnXz6yPGVGudojG+j0tJz5qOg4K2Mub00DPzaYGa+AEWTH4I5Ohki5Azjk 61b/Bt655u3tI+ncHnRNhlJOUab7pGNt2YWzee9Y1OoGNzbjACuzsIkJP1LBA5vTBvrV sfpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=cXC1Sbd/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si2127116pgf.767.2018.04.10.11.28.54; Tue, 10 Apr 2018 11:29:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=cXC1Sbd/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbeDJSZX (ORCPT + 99 others); Tue, 10 Apr 2018 14:25:23 -0400 Received: from mail-eopbgr50053.outbound.protection.outlook.com ([40.107.5.53]:8667 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751929AbeDJSZS (ORCPT ); Tue, 10 Apr 2018 14:25:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=avgHVVnINd4+TWutjvJEH+gwtukuciQHRdqZaksGIgI=; b=cXC1Sbd/uORepzWmTcn891fwDGROQAOI4St6H3NsvJ231jGFDnrAB1UwaELiWbyEZVo9bWBq9YSwbWO2x+gDMA3sr7n2mGAMiELBmQVP4TAvuocjE1Zntq8fJw9p87raegP0EjirEQeXV1p7B7BYuoD+t40tkf0aX4ToTIxn2yM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ayan.Halder@arm.com; Received: from e113505-lin.cambridge.arm.com (217.140.96.140) by VI1PR08MB3037.eurprd08.prod.outlook.com (2603:10a6:803:45::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Tue, 10 Apr 2018 18:25:14 +0000 From: Ayan Kumar Halder To: ayan.halder@arm.com, liviu.dudau@arm.com, brian.starkey@arm.com, malidp@foss.arm.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: nd@arm.com Subject: [PATCH] drm/arm/malidp: Preserve LAYER_FORMAT contents when setting format Date: Tue, 10 Apr 2018 19:25:03 +0100 Message-Id: <1523384703-17621-1-git-send-email-ayan.halder@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: HE1PR0701CA0070.eurprd07.prod.outlook.com (2603:10a6:3:64::14) To VI1PR08MB3037.eurprd08.prod.outlook.com (2603:10a6:803:45::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB3037; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3037;3:tKzpaEu3LzilqhezD+doD6PZLi/1oS+ZpqXVYkLMhJ/PB1m1TT6AfdbMvol3VUAgTGG/AqrFTPPeq2RtSe48k4V7HaNmpTiulF7RNVflMfVA5ZcHFPXhuD3a7vd6pvfidaI3T/Bi3018HlyByfsj6mJ9555QIv1a2yr0JgqGQpBEXAydRlWtXFgJ/YNRpSfK9Zovbc4IBCSJsFp5cneG+LkDGew9jXgcFQL+BRnVSBXhvU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UlnLrhVY0kiG9bIzjL+zjFGq3AR2aWSw+V5BWDUA8bdCKRS+JWeR8Opf8QmxrXdtis3lyZH4SHZ3IU9rQdU07TBq2sAp4PqJu9cA X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:VI1PR08MB3037;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB3037; X-Forefront-PRVS: 0638FD5066 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(376002)(366004)(39380400002)(39860400002)(346002)(199004)(189003)(48376002)(4326008)(7736002)(53936002)(106356001)(16526019)(50226002)(68736007)(6486002)(2616005)(16586007)(81156014)(2906002)(81166006)(316002)(26005)(105586002)(956004)(1857600001)(8936002)(305945005)(476003)(36756003)(8676002)(50466002)(5660300001)(45080400002)(47776003)(52116002)(7696005)(51416003)(66066001)(386003)(478600001)(72206003)(59450400001)(3846002)(97736004)(6666003)(25786009)(6116002)(86362001)(486006);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB3037;H:e113505-lin.cambridge.arm.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR08MB3037;23:2ahyZpfHF0goWPfLGQmWKNcboez2ntn1S8ENq+5vu?= =?us-ascii?Q?izlm/QDZDxpGpVNz5I0nnlggrwyCw+lQcCXHHStWZ8pRB0hA1lD/hfNpXthg?= =?us-ascii?Q?Qin1CsX9NL4TbvEZS9tohdmvT3ltt6/Vzp/C/+zn97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0NF5y2w=;24:Lt0eGYEVpHHnTOsM2E8c1PDdBckDVD6viPt/MihcbDpM6ahL5xm+7hRPWKq6cCXnG4+RgP1GxMMUFGvZlqpzWbmd/izsDSxczfMEv4TvOfE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3037;7:JWJsifsXgj3E4rFhPgN6At3rX4zuLRnRhFMu/XInY6qxAP88lK703dhyQmbpWO4tg7yEKkYgOAw22Bf4rq8366oo8fOezS0LSj8Ivew2xodOzFuMH7/N7+nLm1t3l/A3Qt57WOGx089zjwgpZredq5Jk71aU/Sn5MUwD+8f+MScovywWmUg+96DazTSURcLbzfy0EsKINN0KuSycK8quEpUWpYSLz9fLV1XxvTKvlPtcZo9JdUnxfnvp/NCxXMbj X-MS-Office365-Filtering-Correlation-Id: 1eaf3065-bdee-4d3c-8dc3-08d59f10679a X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2018 18:25:14.0986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1eaf3065-bdee-4d3c-8dc3-08d59f10679a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3037 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On some Mali-DP processors, the LAYER_FORMAT register contains fields other than the format. These bits were unconditionally cleared when setting the pixel format, whereas they should be preserved at their reset values. Reported-by: Brian Starkey Reported-by: Liviu Dudau Signed-off-by: Ayan Kumar halder --- drivers/gpu/drm/arm/malidp_planes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 7a44897..4af3c1f 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -23,6 +23,7 @@ /* Layer specific register offsets */ #define MALIDP_LAYER_FORMAT 0x000 +#define LAYER_FORMAT_MASK 0x3f #define MALIDP_LAYER_CONTROL 0x004 #define LAYER_ENABLE (1 << 0) #define LAYER_FLOWCFG_MASK 7 @@ -337,7 +338,9 @@ static void malidp_de_plane_update(struct drm_plane *plane, dest_w = plane->state->crtc_w; dest_h = plane->state->crtc_h; - malidp_hw_write(mp->hwdev, ms->format, mp->layer->base); + val = malidp_hw_read(mp->hwdev, mp->layer->base); + val = (val & ~LAYER_FORMAT_MASK) | ms->format; + malidp_hw_write(mp->hwdev, val, mp->layer->base); for (i = 0; i < ms->n_planes; i++) { /* calculate the offset for the layer's plane registers */ -- 2.7.4