Received: by 10.192.165.148 with SMTP id m20csp3517092imm; Mon, 23 Apr 2018 07:53:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+URjQnmwkhPuxm301BoJSjHSvVRmCJ4icUk19iHXGb8vbjwiHi9YlypbbXs88MNz4/IvX3 X-Received: by 2002:a17:902:189:: with SMTP id b9-v6mr19492479plb.204.1524495230169; Mon, 23 Apr 2018 07:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524495230; cv=none; d=google.com; s=arc-20160816; b=u15lm1QGirbVpQT6dL3zb89ZsrEMtLoOn5wDVl/FNs0lXxuLOol6lAfy30hdAT/vHP DrPudiJwlT6WOrid8p3jZIe4b44PCEFd0PUAxR0rD0R2ycm9+RV2p8YgUCgw+qy7Lkgd LHRxwGToG1aVfW114qcLXkBFsMa8/rUiLeL617nBG0uyqv8gMwlbl/PSClcjNyxVv9S1 kgq2mioZc+qhON0XRY+Ga/a/xhwR+FGR+on/YyoZrBaOSDDK9aG+dOseacYg805mHDIo tmFK6LeQle2/lPqytkIpXzIR/b5psBsJ2yETu2U2wl9aptoaO9V4/+N0Te64WjPn9EQH eQZg== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ZcDJ7Vm4/WvYqTwDP2Z48VzaY0T5X2Xsm/qIIHmvRLk=; b=kVliUwsmszf0gGnjgeVHk9QwaBPkbI5vWhZPrTGbY+9f2NmGAOwYd/BKv3tbxQebhA sp7dhoe9Kh/ypUs9dgdzDqQ/4zOx8yltYlhBk5Mt0FmZI8IXVL/6pLy0dScjr05Sr2/U H0vhe6zYPUGnOmGZLCbx32bjtNgsPJw5hLHT719pyROjVdTqLJnAbJNAi2HycoK+YD8i 89P+w2VKuiLDaEyIsKzJjbBFy7gN7iLEMJvBxgBPOtvEdAA9kDrI768g3fmKNugKBk8X JF8RIDBsNqdO325yxJ7UAHY/S9SVkvRuEXR/Cy14ilVZC03KE0dpD2tV77Tfwy39Ey72 E61A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector1-arm-com header.b=WsGyVYSw; 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 i67si8929116pfi.95.2018.04.23.07.53.35; Mon, 23 Apr 2018 07:53:50 -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=WsGyVYSw; 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 S1755764AbeDWOwD (ORCPT + 99 others); Mon, 23 Apr 2018 10:52:03 -0400 Received: from mail-he1eur01on0056.outbound.protection.outlook.com ([104.47.0.56]:26568 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755666AbeDWOvZ (ORCPT ); Mon, 23 Apr 2018 10:51:25 -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=ZcDJ7Vm4/WvYqTwDP2Z48VzaY0T5X2Xsm/qIIHmvRLk=; b=WsGyVYSwKZIQID92M2SawiNtbDOeR7GOMqVZ+mlVvdSh3cjzK8vTAMpU1O3ixhRWrp0jFCgsLTyH6hbUZSza+GrBkJYPz0OxKjbZeU1MAAWZcEKAX7Ucw+TQwTcV4P0Lebvw4pS1gULt2fdxBquA7zgRHyiUwysr5Ur7gKivsjM= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from e113505-lin.cambridge.arm.com (217.140.96.140) by VI1PR08MB3039.eurprd08.prod.outlook.com (2603:10a6:803:45::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.12; Mon, 23 Apr 2018 14:51:10 +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 v2 7/8] drm/arm/malidp: Set the output_depth register in modeset Date: Mon, 23 Apr 2018 15:50:50 +0100 Message-Id: <1524495051-3891-8-git-send-email-ayan.halder@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524495051-3891-1-git-send-email-ayan.halder@arm.com> References: <1524495051-3891-1-git-send-email-ayan.halder@arm.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: VI1PR0701CA0055.eurprd07.prod.outlook.com (2603:10a6:800:5f::17) To VI1PR08MB3039.eurprd08.prod.outlook.com (2603:10a6:803:45::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020);SRVR:VI1PR08MB3039; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3039;3:UUpRHLJSGHjVNw7QQIlTuVos+/wfoa+/pqT8mMHxSx8BjYFDm06ZAUfGCY98awQuxAlkK1brJuE/QaI8KxmqTwdHGplQ94yQlrPJf7umY5Pi1NlMs8ybpXR/pl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ZaOPbby8kWO4dGxrGvglTaUOACK6PRjUYLqGQAQzh7JEBg6k7FYuGeqVrHSkapHZOUdXlzXbsTIr9ij/vduM9KchhlDv5mvwE99kA+MW6X7aolzYcAT8vWOPmzodPUaHgrl4wa+9mMHPHVPFU8c8UAgjFEu/Tt6Ze4lLnQSpZMuqTf1cC7qojLKQ3m9BAwKdCCcLehQ2vZBbmSfyl4hZB0d2dwyfUKOEz90uqL4ROE52Q9Gdpl8pyFI7U0m3gj1NeXtmf07yPeqCYTM7bJ4r/JScv5RorOvd4F5x/kXsOe 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)(10201501046)(93006095)(93001095)(3002001)(3231232)(944501410)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:VI1PR08MB3039;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB3039; X-Forefront-PRVS: 06515DA04B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39860400002)(346002)(376002)(39380400002)(396003)(366004)(36756003)(47776003)(50466002)(6116002)(26005)(81166006)(3846002)(8676002)(48376002)(5660300001)(7736002)(66066001)(305945005)(16526019)(446003)(478600001)(2616005)(956004)(476003)(16586007)(52116002)(76176011)(59450400001)(316002)(4326008)(386003)(25786009)(72206003)(86362001)(6666003)(7696005)(11346002)(6486002)(2906002)(8936002)(50226002)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB3039;H:e113505-lin.cambridge.arm.com;FPR:;SPF:None;LANG:en;MLV:sfv; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR08MB3039;23:lwADA757kF0w+q++bMrAWREL+J7DihMbwyfAdsZKb?= =?us-ascii?Q?/AMjeeo4z6gtAD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V+UNHQuew24vlE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB3039;7:dm0LdwGVvWoW0tNIZr45lxqFfkxIwGiMjmBxOIxJqZc54aBgcRIEEP06RjJIYbTO1HsdD98aj4vT0iwH73lJCtlCiy2bT3y55Tjsvx2/6ejcD6uj6kMKo3oHQbIdOmu64ZhmQdveCjc2c0R444yskp5C/UH0pxf5KDHvIsBoMVC2jElvzTS0sVrHK7Uv7g0JeYSj8HOQ+tyzDntVlnxJ3jXScA2QUgkvs2BiFfjv/3PHeHAd1DjuEEUjYxQQ4FtM X-MS-Office365-Filtering-Correlation-Id: 55c6f3c8-2d79-4729-4b41-08d5a929a762 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2018 14:51:10.6345 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55c6f3c8-2d79-4729-4b41-08d5a929a762 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3039 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One needs to store the value of the OUTPUT_DEPTH that one has parsed from device tree, so that it can be restored on system resume. This value is set in the modeset function as this gets reset when the system suspends. Signed-off-by: Ayan Kumar Halder --- Changes in v2:- - Removed the change id --- drivers/gpu/drm/arm/malidp_drv.c | 1 + drivers/gpu/drm/arm/malidp_hw.c | 4 ++++ drivers/gpu/drm/arm/malidp_hw.h | 1 + 3 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index e5a1fa0..bd44a6d 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -601,6 +601,7 @@ static int malidp_bind(struct device *dev) for (i = 0; i < MAX_OUTPUT_CHANNELS; i++) out_depth = (out_depth << 8) | (output_width[i] & 0xf); malidp_hw_write(hwdev, out_depth, hwdev->hw->map.out_depth_base); + hwdev->output_color_depth = out_depth; atomic_set(&malidp->config_valid, 0); init_waitqueue_head(&malidp->wq); diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 90d76e4..1bf10fb 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -234,6 +234,8 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode * { u32 val = 0; + malidp_hw_write(hwdev, hwdev->output_color_depth, + hwdev->hw->map.out_depth_base); malidp_hw_clearbits(hwdev, MALIDP500_DC_CLEAR_MASK, MALIDP500_DC_CONTROL); if (mode->flags & DISPLAY_FLAGS_HSYNC_HIGH) val |= MALIDP500_HSYNCPOL; @@ -458,6 +460,8 @@ static void malidp550_modeset(struct malidp_hw_device *hwdev, struct videomode * { u32 val = MALIDP_DE_DEFAULT_PREFETCH_START; + malidp_hw_write(hwdev, hwdev->output_color_depth, + hwdev->hw->map.out_depth_base); malidp_hw_write(hwdev, val, MALIDP550_DE_CONTROL); /* * Mali-DP550 and Mali-DP650 encode the background color like this: diff --git a/drivers/gpu/drm/arm/malidp_hw.h b/drivers/gpu/drm/arm/malidp_hw.h index 3b049d0..844732d 100644 --- a/drivers/gpu/drm/arm/malidp_hw.h +++ b/drivers/gpu/drm/arm/malidp_hw.h @@ -228,6 +228,7 @@ struct malidp_hw_device { u8 min_line_size; u16 max_line_size; + u32 output_color_depth; /* track the device PM state */ bool pm_suspended; -- 2.7.4