From patchwork Wed Feb 27 16:24:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10832647 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 A28B31575 for ; Thu, 28 Feb 2019 08:28:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D3B72D1A8 for ; Thu, 28 Feb 2019 08:28:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B0A92D2B8; Thu, 28 Feb 2019 08:28:58 +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 DCB2F2D1A8 for ; Thu, 28 Feb 2019 08:28:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CF3E6E14F; Thu, 28 Feb 2019 08:28:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 427 seconds by postgrey-1.36 at gabe; Wed, 27 Feb 2019 16:31:33 UTC Received: from esa6.microchip.iphmx.com (esa6.microchip.iphmx.com [216.71.154.253]) by gabe.freedesktop.org (Postfix) with ESMTPS id 19AA46E0E4 for ; Wed, 27 Feb 2019 16:31:33 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.58,420,1544511600"; d="scan'208";a="24548744" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Feb 2019 09:24:23 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.49) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 27 Feb 2019 09:24:22 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1806.namprd11.prod.outlook.com (10.175.53.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Wed, 27 Feb 2019 16:24:21 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6%8]) with mapi id 15.20.1643.022; Wed, 27 Feb 2019 16:24:21 +0000 From: To: , , , , , , , , , Subject: [PATCH 2/7] drm: atmel-hlcdc: avoid initializing cfg with zero Thread-Topic: [PATCH 2/7] drm: atmel-hlcdc: avoid initializing cfg with zero Thread-Index: AQHUzrjlaSK8QrtZ1k2uOQ9e88LNGA== Date: Wed, 27 Feb 2019 16:24:21 +0000 Message-ID: <1551284609-14594-3-git-send-email-claudiu.beznea@microchip.com> References: <1551284609-14594-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1551284609-14594-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: VI1PR08CA0112.eurprd08.prod.outlook.com (2603:10a6:800:d4::14) 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: b771145b-145b-4edf-5d0f-08d69cd00763 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MWHPR11MB1806; x-ms-traffictypediagnostic: MWHPR11MB1806: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; MWHPR11MB1806; 23:nIfsFMia9rh3c9qyYIaAiTgYunqfCKMFxwOThlA?= =?iso-8859-1?q?q8bmtVERx50IXzz?= =?iso-8859-1?q?V8GRylkWn/PyNr8DoEJrWH5aEk1Tnh9K0kaA+fy4INoj9FiEg/IeB/Rwpn+C?= =?iso-8859-1?q?8ANfaN9z3191N3euukNHNXUzBsQH+51dQjmHzhoKkHQOkDv8i6YY6MTB3c3Y?= =?iso-8859-1?q?Drvreo5DK2hpRqi0Rh4I2mDu0vgsLLQ3KT80No9NZ2+cgt77g/jA/jKmVVGw?= =?iso-8859-1?q?4wH42OvreCvSBjBbu0GCmRsZTy+rwEP0EifFYGSJ993BhAUkUbdsZ7CoKR2n?= =?iso-8859-1?q?w9xUJ3oIaxPiyOZ8ew4WrZmozScJ6Zd4HGM9qDFLdvoxKfV6/hM8ywnfFSDg?= =?iso-8859-1?q?IbDlKXNLOKj9Vnmz1vLASAtylQosLObLtd/EX/NHW2Tzzqnp9g00jouE1JT2?= =?iso-8859-1?q?rQwSavC/3bRtbLZxX9z4h5np/tgz4r9iTbdtcJsy9k7s0yXRg8YokyidBcZy?= =?iso-8859-1?q?oxZzTAr7IM0ikzfFB2ocpJxII1b6je2+bN1P/F00HLpknR+q48mcuv62WbEn?= =?iso-8859-1?q?4kEvEu8+x0g5melGhdou2aO+LqIWUOTkS1jgJ71w26OMXImYBGotZFMtw3F6?= =?iso-8859-1?q?hHG3KwE1h2gEJEzGucdMA3vJaTijoy0RfncEm/CAzPV80wjkN15obV1zFYF/?= =?iso-8859-1?q?og843oFVtQB5BAj+wn0n12lpkvNZaCWBOund59RDz/KQ0jXUJsPhZQr8ckNn?= =?iso-8859-1?q?OM6OFls/kBjmjRtrZX9gPWUs1yIsMEsIc0i97h2xt6DxqU2eYgYY34eSoTOE?= =?iso-8859-1?q?IFgXLUSCL8mZDvMOGw+FOxSKoe1d8GEfVcKdkUkzEoTiFPnRfZ2f1c88bKaR?= =?iso-8859-1?q?xtmtKbJYGhKAGHIaXWlZ7u/WSfe19n4FvF6338HxwE+ke5Zm7uDpZfjdKKa7?= =?iso-8859-1?q?DYgaIfPmoh8wNt8xwaGkSQmbDnumdxgm4a9IiuPLaFyntPs26ha3jsOrhZEf?= =?iso-8859-1?q?Gkhbp9h+7iuR3NadOl9hHEGb1kP6A9RAREkva6SND+95KyAZrcmtBg+KZbL4?= =?iso-8859-1?q?K2nXSZ0OUqDHGwZbU/iqkyw1PyeOtf4ID3/w5jVcLFWTgPNPhSSzWOyDMnNw?= =?iso-8859-1?q?vyNRe48YS+9Gvom6anaxnK5DIJXbQeSspKOf8gS6ZJZaWODFTVM8tGK5U8kU?= =?iso-8859-1?q?1qC87i4LApHZJWEH8rQRCzbpt5rs18C9qjohNJ8y2cSS+SaYDmGm/6T6jWxn?= =?iso-8859-1?q?I53a0XkFfNu+r1hwwRKmBL5+bUAZvRrOTmtW37bf0A/jHcO5KSBjCm/SQnkZ?= =?iso-8859-1?q?Xn83/Bjq6GUj1hFsbkCSypoCNpbi8yEZSGiTLETeJvJa49yCMGMXa/V8cjSW?= =?iso-8859-1?q?qfe2199TKv3VcgEC3ku6mV4VJ0z2Ng?= x-microsoft-antispam-prvs: x-forefront-prvs: 0961DF5286 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(396003)(366004)(136003)(376002)(189003)(199004)(11346002)(105586002)(25786009)(6436002)(8936002)(36756003)(4326008)(66066001)(6486002)(486006)(476003)(76176011)(50226002)(52116002)(186003)(107886003)(72206003)(99286004)(478600001)(2616005)(7416002)(68736007)(110136005)(14454004)(2201001)(71190400001)(6116002)(6506007)(86362001)(446003)(71200400001)(386003)(97736004)(8676002)(3846002)(53936002)(81156014)(54906003)(14444005)(81166006)(256004)(2501003)(316002)(305945005)(6512007)(7736002)(26005)(102836004)(2906002)(106356001)(5660300002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1806; H:MWHPR11MB1549.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: 6R4cmc5wUBnaTN3d0igSG60yDfMYnhnFGQpXeT77Z2YzDQp+svR5ocq6plfaqNvMMVHbbDYXICbpBw0GsnK6Aed9P6nEJwoQPQ4MxiSI4kXLtqKyKHhwWw2G8pF8ZrMl0sLqMwg9XGxGn7QRh20uEuyPf8W6dkftxDe4r+9mIsfNPZOUCBA3ViUbIrlCyHKnu/O97XgIwVuMBU6yUHJ8H9zwR9lO1NbsM7ik6W/ym4dDcS8BGb0lXwb513Dl+3xYC9KTSwSKXB/NQhE0WpYgBOteUcK/y7wUJOYboNsiolvapC1JaBqU2fptAyht0dL2VeD8MYX95g5xCDcPoSP+LclOT2StiNS48BWhyzqZ8LgPjFP33Qs67W4KpkiztjArVo8VPNgEY0UB7KmwJYhegQEuBGzt/MRPD+EMWYSScLE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b771145b-145b-4edf-5d0f-08d69cd00763 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2019 16:24:16.8701 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1806 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Thu, 28 Feb 2019 08:28:56 +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=9mikEp8t9F/rV98FOPkgICa9sMMqDyCpZWXTJFO9iwQ=; b=QB4wes+cWIfsVyRr5pnf4G4j7y4o8asKRkH4LOcvBBwGY8ogCu1YSrcq7kN1L7JrsyAVdABEe6M21SIWoY2YNf0DWhd1gOFmkkCAx3Dl4pqtUvGFKDFuNPHGlN2ORZY0Cxmsfpr61ntXXa/B4miFqC1u/ZWxyCzYLEEkFN1TmdA= 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 17a7a18f6a07..7b0c6683a690 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 |