From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.3.50; helo=eur03-am5-obe.outbound.protection.outlook.com; envelope-from=evan.lloyd@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30050.outbound.protection.outlook.com [40.107.3.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BEFC6225E9671 for ; Wed, 21 Mar 2018 05:47:15 -0700 (PDT) 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=Q/X/99D3maPbjuocXauQKr37RW4LiYkFQvpI1B7Ql4M=; b=OARAJZVfp/1iS0WNgl3YGx7sBqT9x1fuiFn3ZYqI/4TQ3buDqTqB2Rr183fSEhjZZX7MWSCZTC4U8JHaHTfSMWHinEZzOIhjvAsRdkiuizFzrixCKLjiAfQlESqR5mc8ypoLbWygytnLCWOtFglLNXcMLDdhUyiCZSFV46+LHO8= Received: from HE1PR0801MB1771.eurprd08.prod.outlook.com (10.168.150.14) by HE1PR0801MB1932.eurprd08.prod.outlook.com (10.168.94.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Wed, 21 Mar 2018 12:53:42 +0000 Received: from HE1PR0801MB1771.eurprd08.prod.outlook.com ([fe80::69cc:3ecf:9c8c:f5a3]) by HE1PR0801MB1771.eurprd08.prod.outlook.com ([fe80::69cc:3ecf:9c8c:f5a3%17]) with mapi id 15.20.0588.017; Wed, 21 Mar 2018 12:53:42 +0000 From: Evan Lloyd To: Girish Pathak , "edk2-devel@lists.01.org" CC: nd , Stephanie Hughes-Fitt , "leif.lindholm@linaro.org" , "ard.biesheuvel@linaro.org" Thread-Topic: [edk2] [PATCH v3 11/16] ArmPlatformPkg: PCD to swap red/blue format for HDLCD Thread-Index: AQHTwGZQmROTQkoi6k+fjDLkKaaaQaPapnZg Date: Wed, 21 Mar 2018 12:53:42 +0000 Message-ID: References: <20180320161212.79120-1-girish.pathak@arm.com> <20180320161212.79120-12-girish.pathak@arm.com> In-Reply-To: <20180320161212.79120-12-girish.pathak@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Evan.Lloyd@arm.com; x-originating-ip: [217.140.96.140] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0801MB1932; 7:1XiHy6eVh2fHQaSQwdimmHT2W9Y1a6JjNFsMOpcEcUKPwdTyGhfxJW5NrN4Wp2XwgyJTW7jLMvQzKGmIwdPgupmY1Euq8rE3NbwR81qYNokXunhYhdxK5qpNjF9ll7CTb8aZ5etpeYZg+nOZ6Nbg1HnQap5tZTzZNflqoxAHgAriHxIlB/svAFewffwM3CRfNHPR3qrboov36QPH5gM0Hm9n7sspkkZHFlk9Uq5FzHl+b9d5Mw+BKDRXpX6UHC0z x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3fe38080-9f77-401b-b236-08d58f2ac6a2 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(2017052603328)(7153060)(7193020); SRVR:HE1PR0801MB1932; x-ms-traffictypediagnostic: HE1PR0801MB1932: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(162533806227266); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501323)(52105095)(93006095)(93001095)(3002001)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0801MB1932; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1932; x-forefront-prvs: 0618E4E7E1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(366004)(39380400002)(39860400002)(346002)(189003)(199004)(13464003)(305945005)(7736002)(86362001)(25786009)(2900100001)(74316002)(76176011)(7696005)(575784001)(9686003)(14454004)(68736007)(966005)(99286004)(6116002)(72206003)(54906003)(3846002)(2501003)(5250100002)(81156014)(8676002)(229853002)(81166006)(110136005)(4326008)(53936002)(6246003)(2950100002)(66066001)(6436002)(2906002)(6306002)(316002)(55016002)(478600001)(5660300001)(33656002)(105586002)(106356001)(97736004)(8936002)(3660700001)(102836004)(6506007)(3280700002)(53546011)(26005)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1932; H:HE1PR0801MB1771.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: UbNRCq54e5vRUHdGwOX+toPvpz8gx/x7Bsr8uuBneOxOcfC0Lzj8mCNOtBoFMG0HdcVdp/UEvFOELO425VQHY/nGeq7YmmY+PU37OBaigrwqSFkWkAbrN92uz0sr3AGTTKKy5l29TBexsUPXeRdZ22YnsJ2JcG8lg5DGrMb9EstAVzNDUDm0WR8e5mPjr8K303xtj0bPKRLlGd6D/AYkdjKG8rP/VXrahT62ulspGgmv0q4v4fQSgnJCoaTLGjEyDU2lV+rQLg1F37DjvGhgPVmroKxjd0PGQWjXikLFmBHXekaZo153ScrK4mMCWupJKdXO+XSyvuFGeQDX02woSQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fe38080-9f77-401b-b236-08d58f2ac6a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2018 12:53:42.5180 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1932 Subject: Re: [PATCH v3 11/16] ArmPlatformPkg: PCD to swap red/blue format for HDLCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Mar 2018 12:47:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Evan Lloyd > -----Original Message----- > From: edk2-devel On Behalf Of Girish > Pathak > Sent: 20 March 2018 16:12 > To: edk2-devel@lists.01.org > Cc: nd ; Stephanie Hughes-Fitt Fitt@arm.com>; leif.lindholm@linaro.org; ard.biesheuvel@linaro.org > Subject: [edk2] [PATCH v3 11/16] ArmPlatformPkg: PCD to swap red/blue > format for HDLCD >=20 > From: Girish Pathak >=20 > This change adds a new PCD PcdArmHdlcdSwapBlueRedSelect to swap > values for HDLCD RED_SELECT and BLUE_SELECT registers on platforms > where blue and red hardware lines are swapped. >=20 > If set to TRUE in the platform dsc, HDLCD library will swap the values wh= ile > setting RED_SELECT and BLUE_SELECT registers. The default value of the > PCD is FALSE. >=20 > NOTE: The motive for this is that a discrepancy in the Red/Blue lines exi= sts > between some VersatileExpress platforms. Rather than have divergent code= , > this build switch allows a simple, pragmatic solution. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Girish Pathak > Signed-off-by: Evan Lloyd > --- >=20 > Notes: > v3: > - Please don't nest CPP and C conditionals like this. > It is difficult to follow, and results in poor build > time coverage (the non-taken branch at the CPP level > is never seen by the compiler) [Ard] >=20 > Done [Girish] >=20 > ArmPlatformPkg/ArmPlatformPkg.dec | 3 +++ > ArmPlatformPkg/Library/HdLcd/HdLcd.c | 11 ++++++++++- > ArmPlatformPkg/Library/HdLcd/HdLcd.inf | 4 +++- > 3 files changed, 16 insertions(+), 2 deletions(-) >=20 > diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec > b/ArmPlatformPkg/ArmPlatformPkg.dec > index > 378bee9cbc9e4bd50c37b38156016424e24cba73..5231ea822f05c2f281a6 > 190d6eae0fc7d0bc0cb3 100644 > --- a/ArmPlatformPkg/ArmPlatformPkg.dec > +++ b/ArmPlatformPkg/ArmPlatformPkg.dec > @@ -104,6 +104,9 @@ [PcdsFixedAtBuild.common] > # Default is set to UEFI console font format > PixelBlueGreenRedReserved8BitPerColor >=20 > gArmPlatformTokenSpaceGuid.PcdGopPixelFormat|0x00000001|UINT32|0 > x00000040 >=20 > + ## If set, this will swap settings for HDLCD RED_SELECT and > + BLUE_SELECT registers > + > + > gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BO > OLEAN| > + 0x00000045 > + > [PcdsFixedAtBuild.common,PcdsDynamic.common] > ## PL031 RealTimeClock >=20 > gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024 > diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c > b/ArmPlatformPkg/Library/HdLcd/HdLcd.c > index > 96f2bf437fbabd2509f860c67c5442def5b5f03d..5396dde3ba6cd147a8333 > 241a9bc71ab05d7fee3 100644 > --- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c > +++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c > @@ -73,6 +73,8 @@ LcdSetMode ( > SCAN_TIMINGS *Horizontal; > SCAN_TIMINGS *Vertical; >=20 > + EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; > + > EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ModeInfo; >=20 > // Set the video mode timings and other relevant information @@ -96,7 > +98,14 @@ LcdSetMode ( > return Status; > } >=20 > - if (ModeInfo.PixelFormat =3D=3D PixelBlueGreenRedReserved8BitPerColor)= { > + // By default PcdArmHdLcdSwapBlueRedSelect is set to false // > + However on the Juno platform HW lines for BLUE and RED are swapped // > + Therefore PcdArmHdLcdSwapBlueRedSelect is set to TRUE for the Juno > + platform PixelFormat =3D FixedPcdGetBool > (PcdArmHdLcdSwapBlueRedSelect) > + ? PixelRedGreenBlueReserved8BitPerColor > + : PixelBlueGreenRedReserved8BitPerColor; > + > + if (ModeInfo.PixelFormat =3D=3D PixelFormat) { > MmioWrite32 (HDLCD_REG_RED_SELECT, (8 << 8) | 16); > MmioWrite32 (HDLCD_REG_BLUE_SELECT, (8 << 8) | 0); > } else { > diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.inf > b/ArmPlatformPkg/Library/HdLcd/HdLcd.inf > index > 67aad05d210b95b2d23b8e52e4392685efcf3795..7f2ba7bf1c602f4c214ea > caa6425bf9ec7e6da15 100644 > --- a/ArmPlatformPkg/Library/HdLcd/HdLcd.inf > +++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.inf > @@ -2,7 +2,7 @@ > # > # Component description file for HDLCD module # -# Copyright (c) 2011= - > 2012, ARM Ltd. All rights reserved.
> +# Copyright (c) 2011-2018, ARM Ltd. All rights reserved.
> # > # This program and the accompanying materials # are licensed and made > available under the terms and conditions of the BSD License @@ -40,3 > +40,5 @@ [LibraryClasses] >=20 > [FixedPcd] > gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase > + gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect > + > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' >=20 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel