From patchwork Thu Apr 25 12:28:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10918423 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 A289C92A for ; Fri, 26 Apr 2019 07:09:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 900CD28D90 for ; Fri, 26 Apr 2019 07:09:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 848CE28D94; Fri, 26 Apr 2019 07:09:24 +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=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 2C84028D90 for ; Fri, 26 Apr 2019 07:09:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 724FE89306; Fri, 26 Apr 2019 07:09:00 +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; Thu, 25 Apr 2019 12:35:35 UTC Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4DA38870A for ; Thu, 25 Apr 2019 12:35:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549954800"; d="scan'208";a="30826534" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 25 Apr 2019 05:28:28 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.37) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Apr 2019 05:28:27 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1470.namprd11.prod.outlook.com (10.172.53.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Thu, 25 Apr 2019 12:28:26 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 12:28:26 +0000 From: To: , , , , , , Subject: [PATCH v3 1/6] drm: atmel-hlcdc: add config option for clock selection Thread-Topic: [PATCH v3 1/6] drm: atmel-hlcdc: add config option for clock selection Thread-Index: AQHU+2JhBuWnQ7wyq02aSqvKdcdQ3Q== Date: Thu, 25 Apr 2019 12:28:26 +0000 Message-ID: <1556195285-10687-2-git-send-email-claudiu.beznea@microchip.com> References: <1556195285-10687-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1556195285-10687-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: VI1PR07CA0254.eurprd07.prod.outlook.com (2603:10a6:803:b4::21) 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: 0c5612fc-4df4-45b6-4277-08d6c97983cd x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MWHPR11MB1470; x-ms-traffictypediagnostic: MWHPR11MB1470: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(346002)(396003)(39860400002)(189003)(199004)(66476007)(7736002)(81156014)(305945005)(66556008)(64756008)(66446008)(8936002)(68736007)(8676002)(73956011)(66946007)(81166006)(5660300002)(6486002)(3846002)(6116002)(6506007)(2501003)(386003)(76176011)(14444005)(2201001)(102836004)(50226002)(99286004)(86362001)(36756003)(52116002)(4326008)(110136005)(54906003)(107886003)(66066001)(186003)(256004)(26005)(71190400001)(71200400001)(53936002)(25786009)(486006)(478600001)(72206003)(476003)(446003)(11346002)(2616005)(2906002)(97736004)(316002)(6436002)(6512007)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1470; 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: F3FjGzo7i4S3ISNsM+0Z5nRjxOYx47eulEvwtKyRtjY4pHuTFTQt1buGus/KdC3qEPWpVFtfBUlIxQitRSZP9EjLdbxNuxc1Z9lPg+UyvCZyMFN13/sV+KwCcPNOvkLD+0MsJKMpXovxg3+aTWdi0xG+p7uhWb6mGP65k2SxhYnJpVSifqUxqcETD3/MAKZaLfsPc3J0vcap07ikH12WDZhnTZ/qMDr841VB3nSThkzJ1sga0jOZHxl2txm80oyUSDNIy0ZHzjiTLqgRqAW9z2s8pN8cLf37xHzbdPaHLxjpZNcufI3Yld0d6CutqDHchh+KZcMLg0OtwSeC7PbOHXidFdq5fnhZuN2CHNIS4MKN4MOkNGM7V2q6kPdu8JqMF8eTZ9mjjdr8UtUtQTGGH35K9rhLuvzcG7uiuPh1uoY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0c5612fc-4df4-45b6-4277-08d6c97983cd X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 12:28:26.2870 (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: MWHPR11MB1470 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Fri, 26 Apr 2019 07:08:59 +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=qBQ+hpUZ4QZBYGADbXck0DQ1fR4QKfN34rUXcaGzFmE=; b=xeyDBQ9OcoSbq+DeUl1X587Ve5pwC7PLx8Fykc0t/DpM9zx7PCK4nyDxddtSL7zmnNQ10kBLyLIBnh23yZfjMDxyxwgpduU4S2wtYXPFjOeWaNCfcl5PEEfNMicNNJACHLrZNPH64u1HPJKE4jiRzbdM7LbMYtAZi/HZvRXlRcA= 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: linux-pwm@vger.kernel.org, Claudiu.Beznea@microchip.com, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Claudiu Beznea SAM9x60 LCD Controller has no option to select clock source as previous controllers have. To be able to use the same driver even for this LCD controller add a config option to know if controller supports this. Signed-off-by: Claudiu Beznea Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 12 +++++++----- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index 8070a558d7b1..957e6d2fb00f 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -78,7 +78,8 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) unsigned long mode_rate; struct videomode vm; unsigned long prate; - unsigned int cfg; + unsigned int mask = ATMEL_HLCDC_CLKDIV_MASK | ATMEL_HLCDC_CLKPOL; + unsigned int cfg = 0; int div; vm.vfront_porch = adj->crtc_vsync_start - adj->crtc_vdisplay; @@ -101,7 +102,10 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) (adj->crtc_hdisplay - 1) | ((adj->crtc_vdisplay - 1) << 16)); - cfg = ATMEL_HLCDC_CLKSEL; + if (!crtc->dc->desc->fixed_clksrc) { + cfg |= ATMEL_HLCDC_CLKSEL; + mask |= ATMEL_HLCDC_CLKSEL; + } prate = 2 * clk_get_rate(crtc->dc->hlcdc->sys_clk); mode_rate = adj->crtc_clock * 1000; @@ -132,9 +136,7 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) cfg |= ATMEL_HLCDC_CLKDIV(div); - regmap_update_bits(regmap, ATMEL_HLCDC_CFG(0), - ATMEL_HLCDC_CLKSEL | ATMEL_HLCDC_CLKDIV_MASK | - ATMEL_HLCDC_CLKPOL, cfg); + regmap_update_bits(regmap, ATMEL_HLCDC_CFG(0), mask, cfg); cfg = 0; diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index 70bd540d644e..0155efb9c443 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -328,6 +328,7 @@ atmel_hlcdc_layer_to_plane(struct atmel_hlcdc_layer *layer) * @max_hpw: maximum horizontal back/front porch width * @conflicting_output_formats: true if RGBXXX output formats conflict with * each other. + * @fixed_clksrc: true if clock source is fixed * @layers: a layer description table describing available layers * @nlayers: layer description table size */ @@ -340,6 +341,7 @@ struct atmel_hlcdc_dc_desc { int max_vpw; int max_hpw; bool conflicting_output_formats; + bool fixed_clksrc; const struct atmel_hlcdc_layer_desc *layers; int nlayers; }; From patchwork Thu Apr 25 12:36:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10918421 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 D81421575 for ; Fri, 26 Apr 2019 07:09:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C586F28D90 for ; Fri, 26 Apr 2019 07:09:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B963F28D94; Fri, 26 Apr 2019 07:09:21 +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=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 6F7DD28D90 for ; Fri, 26 Apr 2019 07:09:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE359892F8; Fri, 26 Apr 2019 07:08:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id 788C7890F2 for ; Thu, 25 Apr 2019 12:36:20 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549954800"; d="scan'208";a="30827556" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 25 Apr 2019 05:36:19 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.37) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Apr 2019 05:36:19 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1726.namprd11.prod.outlook.com (10.169.237.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12; Thu, 25 Apr 2019 12:36:16 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 12:36:16 +0000 From: To: , , , , , , , Subject: [RESEND][PATCH v3 2/6] drm: atmel-hlcdc: avoid initializing cfg with zero Thread-Topic: [RESEND][PATCH v3 2/6] drm: atmel-hlcdc: avoid initializing cfg with zero Thread-Index: AQHU+2N5/HBwvZtNc0CjiiQBec/BZw== Date: Thu, 25 Apr 2019 12:36:16 +0000 Message-ID: <1556195748-11106-3-git-send-email-claudiu.beznea@microchip.com> References: <1556195748-11106-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1556195748-11106-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: VI1PR0802CA0024.eurprd08.prod.outlook.com (2603:10a6:800:aa::34) 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: 95711c9c-5abf-4d96-7679-08d6c97a9c15 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MWHPR11MB1726; x-ms-traffictypediagnostic: MWHPR11MB1726: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(396003)(39850400004)(346002)(376002)(199004)(189003)(81156014)(7416002)(81166006)(97736004)(2201001)(53936002)(5660300002)(8676002)(2501003)(2906002)(86362001)(50226002)(305945005)(6436002)(68736007)(6486002)(72206003)(107886003)(71190400001)(14454004)(6512007)(8936002)(478600001)(186003)(66066001)(76176011)(26005)(14444005)(256004)(476003)(7736002)(71200400001)(486006)(110136005)(54906003)(6506007)(386003)(6116002)(102836004)(66476007)(66446008)(66946007)(66556008)(36756003)(73956011)(64756008)(11346002)(4326008)(446003)(52116002)(316002)(99286004)(3846002)(2616005)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1726; 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: PFULj3lm9/OoOF9aG9jvURbmEj/u6UIYzjJwJBB2Ph2VEVDNFST5AJ6WC2Ox2TAzgQYV4tG0P4v81WZaKWyhr8z5JNo2ZuCXzDVeA6u5813VaIj1ssZXMZyGTrhxFVvl33s9K/QH5HrwKmd3kpt5J3m7+4r5ATw6EA+O/8jjnSAPL35p6Gruq2/0Qg9lCfQdCX6glTX3oq+bQHxQTkYCxvOTJMo75WVNeTm8lRh39Of9deDCYSOJAj9g0XfnBwSsSvVJ9h7Jclc1WpY9eJegRK/HHFeUpWH14GpOfyMY7dxCHq/GeEAYr+xd42kgvTboU+jwNeWvq9tsNWIB0HN94EqRoIHuI8UN7hAwN6ZmsBSyUBFwjLDJ3hua1DbWbJwwkzbsdyijE+1p5B/G/siALE/nyz3pn83sUB3LIYxjXTc= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 95711c9c-5abf-4d96-7679-08d6c97a9c15 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 12:36:16.6223 (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: MWHPR11MB1726 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Fri, 26 Apr 2019 07:08:59 +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=05Ew9TTkmmmKOWqIqM4i+iqRogO3xdytu+YXeYUWAFU=; b=tzywggNrxuyp9FN0Fli5HTCYI3oCkAD7qsoUvFLxf2KJjFWOABWtvk90UUkVhL2LrE53dxnm677p5iJ6bX4URrqxtNvqXaVY62FcKQBEGB2nBvnaJVlqMZeg1HZDAlCYCwOPAiIprhuerZeVQaIa0WHnBkPYDmffT+TaekfU9+8= 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: linux-pwm@vger.kernel.org, Claudiu.Beznea@microchip.com, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.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 | From patchwork Thu Apr 25 12:36:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10918461 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 CB02A1575 for ; Fri, 26 Apr 2019 07:09:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA4D528843 for ; Fri, 26 Apr 2019 07:09:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE59C28C9D; Fri, 26 Apr 2019 07:09:57 +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=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 7157D28843 for ; Fri, 26 Apr 2019 07:09:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F29489394; Fri, 26 Apr 2019 07:09:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa3.microchip.iphmx.com (esa3.microchip.iphmx.com [68.232.153.233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E0098919C for ; Thu, 25 Apr 2019 12:43:40 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549954800"; d="scan'208";a="31033445" 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; 25 Apr 2019 05:36:28 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Apr 2019 05:36:28 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1726.namprd11.prod.outlook.com (10.169.237.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12; Thu, 25 Apr 2019 12:36:26 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 12:36:26 +0000 From: To: , , , , , , , Subject: [RESEND][PATCH v3 3/6] pwm: atmel-hlcdc: add compatible for SAM9X60 HLCDC's PWM Thread-Topic: [RESEND][PATCH v3 3/6] pwm: atmel-hlcdc: add compatible for SAM9X60 HLCDC's PWM Thread-Index: AQHU+2N/EO519ERcM0yHdVZu5vHx0A== Date: Thu, 25 Apr 2019 12:36:26 +0000 Message-ID: <1556195748-11106-4-git-send-email-claudiu.beznea@microchip.com> References: <1556195748-11106-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1556195748-11106-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: VI1PR0802CA0024.eurprd08.prod.outlook.com (2603:10a6:800:aa::34) 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: 59ae919e-7885-477d-4c38-08d6c97aa1a6 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MWHPR11MB1726; x-ms-traffictypediagnostic: MWHPR11MB1726: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(396003)(39850400004)(346002)(376002)(199004)(189003)(81156014)(7416002)(81166006)(97736004)(2201001)(53936002)(5660300002)(8676002)(2501003)(2906002)(86362001)(50226002)(305945005)(6436002)(68736007)(6486002)(72206003)(107886003)(71190400001)(14454004)(6512007)(8936002)(478600001)(186003)(66066001)(76176011)(26005)(256004)(476003)(7736002)(71200400001)(486006)(110136005)(54906003)(6506007)(386003)(6116002)(102836004)(66476007)(66446008)(66946007)(66556008)(36756003)(73956011)(64756008)(11346002)(4326008)(4744005)(446003)(52116002)(316002)(99286004)(3846002)(2616005)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1726; 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: 6HXbwbZRw47gX7FFqrTJOZePJVvLHPTJy/xuFs3tep35QVAxW1Z+hH+S6CdW7FLNvdEFkFe424LMp9Oyjq5fi9YW4Z54Z7fcT/Sfmd/5QVx63EnXmQNRqpbVHRkTISHl/w+7RunPaaunwxRh5HGRzluaqI5mwG664Vs9mBDIKMztCAQagKor//lNy5Om6kVzg1unHz87w91JOkvxlO3ODgUn2uVQEwpZHmaypT3bblBc5L0xQYbPERWlad1+ux8v+PRpGKsr1vTePPuLf1tNBbhpu6hIuT09zHSE3Rdhg+N0WRIcswyCPcnl41LpnuuZwIS0b9/MtmYabZn/lkLmeJcoM/YxDMxCQTLms1RNzBGHJzPrXsszjJCv50r2S7suba6inbSPKb8Q9k3MjDmTrSGEBdJNIMupjp3mRWJPRjg= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 59ae919e-7885-477d-4c38-08d6c97aa1a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 12:36:26.2385 (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: MWHPR11MB1726 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Fri, 26 Apr 2019 07:08:59 +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=c9h/MMmFj42db5+5+C/Tcm3AI4/TTM1N7XpbaMOTN1M=; b=vp1Tbq0BUpY3998j9ejhTClxm7/pwHReXr+uABcjy/PEoCxB3tezLssDbXtTZUfyzGh+76grCXWoIMfJ1SsSuwVldBM6tBH7BQlDZmoWorUQ4k+IVZnzSdjXt1CKWiY7AudsQQl1KuwSdphYo8U4tBCSjfdsbVIECjBEmaJ81i8= 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: linux-pwm@vger.kernel.org, Claudiu.Beznea@microchip.com, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Claudiu Beznea Add compatible string for SAM9X60 HLCDC's PWM. Signed-off-by: Claudiu Beznea Acked-by: Thierry Reding --- drivers/pwm/pwm-atmel-hlcdc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c index 54c6633d9b5d..6bfbe1a902fc 100644 --- a/drivers/pwm/pwm-atmel-hlcdc.c +++ b/drivers/pwm/pwm-atmel-hlcdc.c @@ -246,6 +246,7 @@ static const struct of_device_id atmel_hlcdc_dt_ids[] = { .compatible = "atmel,sama5d4-hlcdc", .data = &atmel_hlcdc_pwm_sama5d3_errata, }, + { .compatible = "microchip,sam9x60-hlcdc", }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, atmel_hlcdc_dt_ids); From patchwork Thu Apr 25 12:36:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10918483 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 D0F7892A for ; Fri, 26 Apr 2019 07:10:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C028528843 for ; Fri, 26 Apr 2019 07:10:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3CC828C9D; Fri, 26 Apr 2019 07:10:20 +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=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 540E628843 for ; Fri, 26 Apr 2019 07:10:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E134089428; Fri, 26 Apr 2019 07:09:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa5.microchip.iphmx.com (esa5.microchip.iphmx.com [216.71.150.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D01189143 for ; Thu, 25 Apr 2019 12:36:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549954800"; d="scan'208";a="29070903" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Apr 2019 05:36:35 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.107) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Apr 2019 05:36:34 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1726.namprd11.prod.outlook.com (10.169.237.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12; Thu, 25 Apr 2019 12:36:31 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 12:36:31 +0000 From: To: , , , , , , , Subject: [RESEND][PATCH v3 4/6] drm: atmel-hlcdc: enable sys_clk during initalization. Thread-Topic: [RESEND][PATCH v3 4/6] drm: atmel-hlcdc: enable sys_clk during initalization. Thread-Index: AQHU+2OCAotEdimhnESxLYiP7v88dg== Date: Thu, 25 Apr 2019 12:36:30 +0000 Message-ID: <1556195748-11106-5-git-send-email-claudiu.beznea@microchip.com> References: <1556195748-11106-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1556195748-11106-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: VI1PR0802CA0024.eurprd08.prod.outlook.com (2603:10a6:800:aa::34) 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: 8f8679e8-5b40-44b0-7eca-08d6c97aa4ab x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MWHPR11MB1726; x-ms-traffictypediagnostic: MWHPR11MB1726: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(396003)(39850400004)(346002)(376002)(199004)(189003)(81156014)(7416002)(81166006)(97736004)(2201001)(53936002)(5660300002)(8676002)(2501003)(2906002)(86362001)(50226002)(305945005)(6436002)(68736007)(6486002)(72206003)(107886003)(71190400001)(14454004)(6512007)(8936002)(478600001)(186003)(66066001)(76176011)(26005)(14444005)(256004)(476003)(7736002)(71200400001)(486006)(110136005)(54906003)(6506007)(386003)(6116002)(102836004)(66476007)(66446008)(66946007)(66556008)(36756003)(73956011)(64756008)(11346002)(4326008)(446003)(52116002)(316002)(99286004)(3846002)(2616005)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1726; 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: Zw3MQrkSrUJnt8aCxgxcVUX11f0bE6E4hcP+Fso8a8WmUEOei6igrRmRLgvqFp2H3OzZBXmku90wERq3EWKoHtcKYdp3R/lbIkVpw+Fq0KxfRTV55X2d8EUyqfmfNuzZTmWhpWQsi5zpBEQjzfmdJpcMgefRRZ+Il8htgJrbIEayFjFohgHA18kj75gYPd8SXJKL5lYUsk5jDKRdVj+qCSXnAAA93eFe7sP2DpPMXXo76VTh2lj4A9S1F8rXT0zNk0Nj2eHG9Y/dEe+NOxMRYS8KEGs0LPXYUvyXSDq66qeqnjFIzOZZUhFV7cw+WT9eGlibEm5SL4GbLYHv3JQ+Ts6X4Li83wddUf/Sl/NkEQ5enkTAZfMx/lr3BSo0Ma1FRRCPd3+bDGP2kxZWueK8c7kzfpq2L/WcWNa/CGOa3wQ= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8f8679e8-5b40-44b0-7eca-08d6c97aa4ab X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 12:36:31.0483 (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: MWHPR11MB1726 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Fri, 26 Apr 2019 07:08:59 +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=bm0v2SKOAqLFTnLsoPeCFq1wYIKHNr6xoLZJSPArh+U=; b=0yT034VgPUCepOkAJr7E/aiOwXPcNTgJhcsze3wyRQTdLDQwQ1sfUhV8DupKxhiVW1GOWYoyBF/lOYlZ8GT/prSLqNJMUGrupKwtMR4GDbkxKGA/LI+iUIf5BqrjdmXrHbYNkV1kC91DsahfWH16NRi/jAoD/TAUcm7ZdQaF4dg= 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: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sandeep.Sheriker@microchip.com, 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: Sandeep Sheriker Mallikarjun For SAM9X60 SoC, sys_clk is through lcd_gclk clock source and this needs to be enabled before enabling lcd_clk. Signed-off-by: Sandeep Sheriker Mallikarjun [claudiu.beznea@microchip.com: add fixed_clksrc checks] Signed-off-by: Claudiu Beznea --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index 0be13eceedba..8bf51f853721 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -625,10 +625,18 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) dc->hlcdc = dev_get_drvdata(dev->dev->parent); dev->dev_private = dc; + if (dc->desc->fixed_clksrc) { + ret = clk_prepare_enable(dc->hlcdc->sys_clk); + if (ret) { + dev_err(dev->dev, "failed to enable sys_clk\n"); + goto err_destroy_wq; + } + } + ret = clk_prepare_enable(dc->hlcdc->periph_clk); if (ret) { dev_err(dev->dev, "failed to enable periph_clk\n"); - goto err_destroy_wq; + goto err_sys_clk_disable; } pm_runtime_enable(dev->dev); @@ -664,6 +672,9 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) err_periph_clk_disable: pm_runtime_disable(dev->dev); clk_disable_unprepare(dc->hlcdc->periph_clk); +err_sys_clk_disable: + if (dc->desc->fixed_clksrc) + clk_disable_unprepare(dc->hlcdc->sys_clk); err_destroy_wq: destroy_workqueue(dc->wq); @@ -688,6 +699,8 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev) pm_runtime_disable(dev->dev); clk_disable_unprepare(dc->hlcdc->periph_clk); + if (dc->desc->fixed_clksrc) + clk_disable_unprepare(dc->hlcdc->sys_clk); destroy_workqueue(dc->wq); } @@ -805,6 +818,8 @@ static int atmel_hlcdc_dc_drm_suspend(struct device *dev) regmap_read(regmap, ATMEL_HLCDC_IMR, &dc->suspend.imr); regmap_write(regmap, ATMEL_HLCDC_IDR, dc->suspend.imr); clk_disable_unprepare(dc->hlcdc->periph_clk); + if (dc->desc->fixed_clksrc) + clk_disable_unprepare(dc->hlcdc->sys_clk); return 0; } @@ -814,6 +829,8 @@ static int atmel_hlcdc_dc_drm_resume(struct device *dev) struct drm_device *drm_dev = dev_get_drvdata(dev); struct atmel_hlcdc_dc *dc = drm_dev->dev_private; + if (dc->desc->fixed_clksrc) + clk_prepare_enable(dc->hlcdc->sys_clk); clk_prepare_enable(dc->hlcdc->periph_clk); regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IER, dc->suspend.imr); From patchwork Thu Apr 25 12:28:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10918415 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 B111F92A for ; Fri, 26 Apr 2019 07:09:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E74928D92 for ; Fri, 26 Apr 2019 07:09:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92B1628D95; Fri, 26 Apr 2019 07:09:13 +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=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 38AB728D92 for ; Fri, 26 Apr 2019 07:09:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8B64892DE; Fri, 26 Apr 2019 07:08:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa1.microchip.iphmx.com (esa1.microchip.iphmx.com [68.232.147.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id A84CE890B3 for ; Thu, 25 Apr 2019 12:35:50 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549954800"; d="scan'208";a="32236326" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Apr 2019 05:28:44 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.106) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Apr 2019 05:28:44 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1470.namprd11.prod.outlook.com (10.172.53.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.13; Thu, 25 Apr 2019 12:28:42 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 12:28:42 +0000 From: To: , , , , , , Subject: [PATCH v3 5/6] drm: atmel-hlcdc: add sam9x60 LCD controller Thread-Topic: [PATCH v3 5/6] drm: atmel-hlcdc: add sam9x60 LCD controller Thread-Index: AQHU+2JrxZibZKRASUmuMtLyaD0eZQ== Date: Thu, 25 Apr 2019 12:28:42 +0000 Message-ID: <1556195285-10687-6-git-send-email-claudiu.beznea@microchip.com> References: <1556195285-10687-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1556195285-10687-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: VI1PR07CA0254.eurprd07.prod.outlook.com (2603:10a6:803:b4::21) 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: 4b3420c6-47e8-4314-e3a4-08d6c9798d82 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MWHPR11MB1470; x-ms-traffictypediagnostic: MWHPR11MB1470: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(366004)(346002)(396003)(39860400002)(189003)(199004)(66476007)(7736002)(81156014)(305945005)(66556008)(64756008)(66446008)(8936002)(68736007)(8676002)(73956011)(66946007)(81166006)(5660300002)(6486002)(3846002)(6116002)(6506007)(2501003)(386003)(76176011)(2201001)(102836004)(50226002)(99286004)(86362001)(36756003)(52116002)(4326008)(110136005)(54906003)(107886003)(66066001)(186003)(256004)(26005)(71190400001)(71200400001)(53936002)(25786009)(486006)(478600001)(72206003)(476003)(446003)(11346002)(2616005)(2906002)(97736004)(316002)(6436002)(6512007)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1470; 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: amx9Mncc/IqCPZFHQPQzLRvRcCCmXF5owHmEHKjXKIvRjj2SbXb3PrU+Dq8yllw2a/J/MFKOmRLKGce1onWxaIeSCmFQ4nous3fWVt4JjyytYMFyRiztmYrGRM0xMzZB1WJhxd9vL9H3tflm/KmueMvk/hlo5TfiBTmDiusd0NBf913LdtkC2Y5EXcrGeAFp09E0nojSpdRcSRL5R1eVvWP8zj1RglJ0k5WO0klUdgsCQxPB0mVROVS6hGx26zUuoz8HvBIg4gDpSOapS2mTJLLqhW+vP6r3S2316fthD/37tjeJexQdEmpc0PpTqUdoBRGb05M16ApCFBIYf2ccg6siX3sBwgS1a8amAauKCg9PTlcyRyam2Hilla5cnLZHNBqebXFP8HM5YotIqFGILcfLbrJ/HwB23xQn3GNC2LI= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4b3420c6-47e8-4314-e3a4-08d6c9798d82 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 12:28:42.6949 (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: MWHPR11MB1470 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Fri, 26 Apr 2019 07:08:59 +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=KLOItgOkagNtwzRih3ESsEC6WMRUTvpDPFWuSAcCvmo=; b=rfYw7sxV6ERx41tztbXQmHrRzqQPwD3THd/AqCq2rtE5C+wHZRBi/HMMvv7oaGRRrmEtfz4eEbt2shaO+fIC3Gwt01clVNHRG2CjojSY0QR78ttJqWE7VJJUJsBIcB0q2I0V74/5sGPZSwwdfdCn3YHma26uCJHhlboi3jOYu5g= 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: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sandeep.Sheriker@microchip.com, 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: Sandeep Sheriker Mallikarjun Add the LCD controller for SAM9X60. Signed-off-by: Sandeep Sheriker Mallikarjun [claudiu.beznea@microchip.com: add fixed_clksrc option to atmel_hlcdc_dc_sam9x60] Signed-off-by: Claudiu Beznea --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 101 +++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index 8bf51f853721..fb2e7646daeb 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -364,6 +364,103 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sama5d4 = { .nlayers = ARRAY_SIZE(atmel_hlcdc_sama5d4_layers), .layers = atmel_hlcdc_sama5d4_layers, }; + +static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sam9x60_layers[] = { + { + .name = "base", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x60, + .id = 0, + .type = ATMEL_HLCDC_BASE_LAYER, + .cfgs_offset = 0x2c, + .layout = { + .xstride = { 2 }, + .default_color = 3, + .general_config = 4, + .disc_pos = 5, + .disc_size = 6, + }, + .clut_offset = 0x600, + }, + { + .name = "overlay1", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x160, + .id = 1, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x2c, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + .clut_offset = 0xa00, + }, + { + .name = "overlay2", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x260, + .id = 2, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x2c, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + .clut_offset = 0xe00, + }, + { + .name = "high-end-overlay", + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, + .regs_offset = 0x360, + .id = 3, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x4c, + .layout = { + .pos = 2, + .size = 3, + .memsize = 4, + .xstride = { 5, 7 }, + .pstride = { 6, 8 }, + .default_color = 9, + .chroma_key = 10, + .chroma_key_mask = 11, + .general_config = 12, + .scaler_config = 13, + .phicoeffs = { + .x = 17, + .y = 33, + }, + .csc = 14, + }, + .clut_offset = 0x1200, + }, +}; + +static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sam9x60 = { + .min_width = 0, + .min_height = 0, + .max_width = 2048, + .max_height = 2048, + .max_spw = 0xff, + .max_vpw = 0xff, + .max_hpw = 0x3ff, + .fixed_clksrc = true, + .nlayers = ARRAY_SIZE(atmel_hlcdc_sam9x60_layers), + .layers = atmel_hlcdc_sam9x60_layers, +}; + static const struct of_device_id atmel_hlcdc_of_match[] = { { .compatible = "atmel,at91sam9n12-hlcdc", @@ -385,6 +482,10 @@ static const struct of_device_id atmel_hlcdc_of_match[] = { .compatible = "atmel,sama5d4-hlcdc", .data = &atmel_hlcdc_dc_sama5d4, }, + { + .compatible = "microchip,sam9x60-hlcdc", + .data = &atmel_hlcdc_dc_sam9x60, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, atmel_hlcdc_of_match); From patchwork Thu Apr 25 12:36:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10918413 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 52E7692A for ; Fri, 26 Apr 2019 07:09:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 324F228D92 for ; Fri, 26 Apr 2019 07:09:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2326D28D95; Fri, 26 Apr 2019 07:09:11 +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=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 98D2E28D92 for ; Fri, 26 Apr 2019 07:09:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78EE1892DB; Fri, 26 Apr 2019 07:08:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C04389143 for ; Thu, 25 Apr 2019 12:36:56 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549954800"; d="scan'208";a="30827574" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Apr 2019 05:36:45 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.106) with Microsoft SMTP Server (TLS) id 14.3.352.0; Thu, 25 Apr 2019 05:36:41 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1726.namprd11.prod.outlook.com (10.169.237.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12; Thu, 25 Apr 2019 12:36:40 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::f01a:9325:7a65:cdb4%4]) with mapi id 15.20.1813.017; Thu, 25 Apr 2019 12:36:40 +0000 From: To: , , , , , , , Subject: [RESEND][PATCH v3 6/6] drm/atmel-hclcdc: revert shift by 8 Thread-Topic: [RESEND][PATCH v3 6/6] drm/atmel-hclcdc: revert shift by 8 Thread-Index: AQHU+2OHjyMls/m/3UuvVRSuLjY80g== Date: Thu, 25 Apr 2019 12:36:39 +0000 Message-ID: <1556195748-11106-7-git-send-email-claudiu.beznea@microchip.com> References: <1556195748-11106-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1556195748-11106-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: VI1PR0802CA0024.eurprd08.prod.outlook.com (2603:10a6:800:aa::34) 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: db32b240-def2-4b9b-e72e-08d6c97aa9cf x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MWHPR11MB1726; x-ms-traffictypediagnostic: MWHPR11MB1726: x-microsoft-antispam-prvs: x-forefront-prvs: 0018A2705B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(396003)(39850400004)(346002)(376002)(199004)(189003)(81156014)(7416002)(81166006)(97736004)(2201001)(53936002)(5660300002)(8676002)(2501003)(2906002)(86362001)(50226002)(305945005)(6436002)(68736007)(6486002)(72206003)(71190400001)(14454004)(6512007)(8936002)(478600001)(186003)(66066001)(76176011)(26005)(14444005)(256004)(476003)(7736002)(71200400001)(486006)(110136005)(54906003)(6506007)(386003)(6116002)(102836004)(66476007)(66446008)(66946007)(66556008)(36756003)(73956011)(64756008)(11346002)(4326008)(4744005)(446003)(52116002)(316002)(99286004)(3846002)(2616005)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1726; 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: 3Dh6MexGbwbU+TXnqRZ+lnb9DdLre30KSRoCpIUhpNjWd90VcLJrvutNoqT2Im5Bb0PdEuCD8cJSDw2C++H9Pzy3dKIEPsSCVMgU7s+zjxTJJin0Zpa7p5Ddco3mofmYpNbFbuoXuNXCLaC2+2bRS+/5PrlArWXE3mSYrMOkKeqplXKhjsY2Q4+my8ovQdTz6icOZeGLFHf0kjX/uCdnVRtW7vSjcn3Gaiz6YNy+FAnPyDL43hnpfUCGVojdFcnBeC9mMKGB3ZwaGJ7zli/mZeZzq7Onol70C1omrSSaUWHdsI0m3KUugc+FujphrfJEre4powGEMrmI4OKuTghArJYHiZQbQRGhy5zOmlQusauTzcHKnY1yJ1KpBrWPx5y/a6dd+4826Nd1+g7tU5wrg6fT20gK48MLYxlCEgwffw0= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: db32b240-def2-4b9b-e72e-08d6c97aa9cf X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2019 12:36:39.8727 (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: MWHPR11MB1726 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Fri, 26 Apr 2019 07:08:59 +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=xaMBIGL3M1PjcCoUCC2H90HkEKofKXUHFm5nny0vUK4=; b=CPTvkdUpY1RQmzR8O/nHXr9umwdd+XK9cYtSSXZ119+dCE/ZS018YBZKsw5SejPtUmQ4WIF1vE8acUnv/F98bLwajHIgSVKb6udVboccmhC3Ra+Cb6Gf9PLNq0jHlA51iSE2Dmf8HjejDH73r6N6qepmmbdGP1NMmXg4+0ZuDsw= 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: linux-pwm@vger.kernel.org, maxime.ripard@bootlin.com, 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 Revert shift by 8 of state->base.alpha. This introduced regresion on planes. Fixes: 7f73c10b256b ("drm/atmel-hclcdc: Convert to the new generic alpha property") Cc: Maxime Ripard Signed-off-by: Claudiu Beznea Acked-by: Maxime Ripard --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index e836e2de35ce..cc8301352384 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c @@ -382,7 +382,7 @@ atmel_hlcdc_plane_update_general_settings(struct atmel_hlcdc_plane *plane, cfg |= ATMEL_HLCDC_LAYER_LAEN; else cfg |= ATMEL_HLCDC_LAYER_GAEN | - ATMEL_HLCDC_LAYER_GA(state->base.alpha >> 8); + ATMEL_HLCDC_LAYER_GA(state->base.alpha); } if (state->disc_h && state->disc_w)