From patchwork Tue Mar 5 10:07:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10840531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1342A1669 for ; Wed, 6 Mar 2019 08:09:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01BFB2CAFD for ; Wed, 6 Mar 2019 08:09:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9E142CC68; Wed, 6 Mar 2019 08:09:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97F302CAFD for ; Wed, 6 Mar 2019 08:09:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 22A206E0B6; Wed, 6 Mar 2019 08:09:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 426 seconds by postgrey-1.36 at gabe; Tue, 05 Mar 2019 10:14:53 UTC Received: from esa3.microchip.iphmx.com (esa3.microchip.iphmx.com [68.232.153.233]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7EC389F2A for ; Tue, 5 Mar 2019 10:14:53 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.58,443,1544511600"; d="scan'208";a="27662189" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Mar 2019 03:07:45 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.105) with Microsoft SMTP Server (TLS) id 14.3.352.0; Tue, 5 Mar 2019 03:07:45 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1647.namprd11.prod.outlook.com (10.172.55.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Tue, 5 Mar 2019 10:07:43 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6%9]) with mapi id 15.20.1665.020; Tue, 5 Mar 2019 10:07:43 +0000 From: To: , , , , , , , , , Subject: [PATCH v2 2/7] drm: atmel-hlcdc: avoid initializing cfg with zero Thread-Topic: [PATCH v2 2/7] drm: atmel-hlcdc: avoid initializing cfg with zero Thread-Index: AQHU0ztG4BRXLYfxrk2A4BtI6D5/UA== Date: Tue, 5 Mar 2019 10:07:43 +0000 Message-ID: <1551780434-4580-3-git-send-email-claudiu.beznea@microchip.com> References: <1551780434-4580-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1551780434-4580-1-git-send-email-claudiu.beznea@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR0502CA0011.eurprd05.prod.outlook.com (2603:10a6:803:1::24) To MWHPR11MB1549.namprd11.prod.outlook.com (2603:10b6:301:c::17) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dd1ab314-e2b4-4283-7e6c-08d6a1526860 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MWHPR11MB1647; x-ms-traffictypediagnostic: MWHPR11MB1647: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; MWHPR11MB1647; 23:D6J8n+GcEgC1qMSW27Z9U8rwoAyiUf7vZt574Vx?= =?iso-8859-1?q?7ouSd5cltFrZi9h?= =?iso-8859-1?q?uiddy76U4EZjtHPJrRMl9qyvYLjICEbCg88Zptzu41YhKPDYqLdOp9lYBuO4?= =?iso-8859-1?q?cPtly7slQM9HK8tNe/5uP+TmjriS0csDnVUT0JKJxr2EBTA6/SjEDyNH1AgG?= =?iso-8859-1?q?pybH7OZDkOOl5Liv1W90uqX0IKzzfHYcm+VDxQVgUlqJhvRT4Cp9m/FHARSb?= =?iso-8859-1?q?q8CEsh4vnqIypBY3rbqhly1DrxNaC38kDdY4hdXGgfC7OUZw4nZjj7BO8Sv/?= =?iso-8859-1?q?e6XaG/ymQhmuBZGKhJpqD59Mr0UH5x2yGVSU3iZzkPmm9+BWOI2oUjMQIrVP?= =?iso-8859-1?q?2Fq70O981RYIPyYc9a2VcG35D42ghV0pSfN3AnsR+MO5M2GrYvHgIQzw90d7?= =?iso-8859-1?q?OU/peGCPaZ6UPbSWdWjS+/LEV0vl5cm588gc7h2OTyXPdiyz9RGl47PpquuD?= =?iso-8859-1?q?2IIcNiWkcRUhA8oslX5vxb3GPzw6kx6bgVgIO/AJbq3SHgWa5eRN9gPFzUtw?= =?iso-8859-1?q?Ii5d8Wpj1HwZcE/8v8aJCABauI4ryuoG1N6II7wv/lXblvsiLy240rUJYrca?= =?iso-8859-1?q?xd4NLZ+jqGEOYE4DdLwDRZmsFcak9YxokTAU8tBcHMCK1z+JkoodJPGVpnw3?= =?iso-8859-1?q?Nyvd28WmPeDl/H5WKu7HOg0YXxdsENPFLc8Og7Rd0XKzMT7w2dwcdlIZYVlu?= =?iso-8859-1?q?dl3PuE0hW6yNp5FC3fPBDTbXVY7hc8OgKBq/7RwVp0TqnnCO+A2M4aukZWc+?= =?iso-8859-1?q?MYAtmSoiKkSp+3SnY6fVeZVuynID+yQCt1isL1J5spfofC1ON6itvvYUuGFN?= =?iso-8859-1?q?qheySo878iyndNz7+DE1N486D7S4Z9EL0ser0G2sNvNkW6CitscReQ9IdiVY?= =?iso-8859-1?q?Ik8EDI09Rrd0pGemrfMwzKenHcd/VKKZUHR+tMmqzj9Eb+/3MlG7PqwBCPky?= =?iso-8859-1?q?kMv0fcEv/cxToSpL0J+1hb/LXul5tmIqH3TchZpa2pLkln2yU4Vkoj9TLveK?= =?iso-8859-1?q?XkFIBG8VmTE+luJQ852RmR4K9QwJ1WMIyb4eQWintZOJLApMvUarKGv7WNEi?= =?iso-8859-1?q?5DsvrwooqHuxJVFYF+3ehMyHo9mIew+PCjaNnxZODiEv33LjL+ISGCiznNPe?= =?iso-8859-1?q?OgV3ubUhuqsjdrHKV3WHajujknygcJoiCAgFKMollpqWODEi54QMSKu6Szzg?= =?iso-8859-1?q?+oNpuCYNMIIlHz6Zo6Gokp/BQqU0FVsRdeYWoAdbhZFfybpoHKYQ8+BpNglB?= =?iso-8859-1?q?nUdyBVF13XmJMgAHk0p748KIcvmCr6mPdRgidfXte2kjjILXqjWk0UbODYdY?= =?iso-8859-1?q?TKNDvgBAS2wtMyCaOQWzRpEXlkBtf6?= x-microsoft-antispam-prvs: x-forefront-prvs: 0967749BC1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(346002)(136003)(366004)(199004)(189003)(106356001)(72206003)(3846002)(99286004)(81156014)(52116002)(36756003)(76176011)(14454004)(81166006)(66066001)(8676002)(110136005)(6116002)(105586002)(6486002)(7736002)(5660300002)(8936002)(305945005)(25786009)(102836004)(54906003)(97736004)(316002)(2906002)(7416002)(2501003)(2616005)(186003)(71190400001)(6506007)(386003)(256004)(476003)(68736007)(11346002)(71200400001)(6512007)(2201001)(107886003)(53936002)(446003)(50226002)(486006)(4326008)(86362001)(6436002)(478600001)(14444005)(26005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1647; H:MWHPR11MB1549.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: xi2y6bEtQGeZ7/cjrLtOf52mOLRR6dyJ4P7s0XStC/7+oAtiVWfvHTR/GeC0/m7nVmFP5ZG1y541GEA+B1N0rTVkzjVuYiAM6ylRHO6dQpGYea0naN/BMbrHmf7Is+dDhYlB5/TMc2/j0/U1IFubktq8kf6x5AjAe1YST8/pqPpQfifT9pdOSwNnhe7pob/Y1yKDx77KqgxBxjrY2Bav1awcyNJ79srrer58CtSOJXZAxythXtUyG48adEEy9xPIWqqQrY536LWEm/gj+quzJp0C0wcpet5Y82MwoqGAS4NKcM7dXZ/t1ecHaoa8b7yuyZGigto+RdN/ydcloksUU4UZVHHem5GfAyKvRZtnNg3WJR0zWOJ2zFWhNbsiptZBPyNEg7vY6XqeQooeiI+GuJT0h11XFZKh30CZ0YExyDI= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: dd1ab314-e2b4-4283-7e6c-08d6a1526860 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2019 10:07:43.3501 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1647 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Wed, 06 Mar 2019 08:09:28 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7zkVpyiWck4iv0VjBI3T28y9cihO2TVG7cnvYn59DdU=; b=bhSAsVO7FOxfLOxKMqq61jTsTdZB5ZFUTm+UFf+kcywHslYko2lkAN6v6eer7XmaZfFxz/9vLa9TC7gzm7wVXOp6N/C0d24FYoV6vTz+AgecbeOEylefIZu07MdstsRUbIxyLv3uDSkX8XbbLn4VNv1vSx5XRucWrmMpUgoKPhw= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Claudiu.Beznea@microchip.com; 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: devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Claudiu.Beznea@microchip.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Claudiu Beznea Remove cfg initialization with zero and read state with drm_crtc_state_to_atmel_hlcdc_crtc_state() so that cfg to be initialized with state's output_mode. Signed-off-by: Claudiu Beznea Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index 957e6d2fb00f..81c50772df05 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -138,7 +138,8 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) regmap_update_bits(regmap, ATMEL_HLCDC_CFG(0), mask, cfg); - cfg = 0; + state = drm_crtc_state_to_atmel_hlcdc_crtc_state(c->state); + cfg = state->output_mode << 8; if (adj->flags & DRM_MODE_FLAG_NVSYNC) cfg |= ATMEL_HLCDC_VSPOL; @@ -146,9 +147,6 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) if (adj->flags & DRM_MODE_FLAG_NHSYNC) cfg |= ATMEL_HLCDC_HSPOL; - state = drm_crtc_state_to_atmel_hlcdc_crtc_state(c->state); - cfg |= state->output_mode << 8; - regmap_update_bits(regmap, ATMEL_HLCDC_CFG(5), ATMEL_HLCDC_HSPOL | ATMEL_HLCDC_VSPOL | ATMEL_HLCDC_VSPDLYS | ATMEL_HLCDC_VSPDLYE |