From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::229; helo=mail-wm0-x229.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 606F421CEB149 for ; Wed, 25 Oct 2017 07:29:37 -0700 (PDT) Received: by mail-wm0-x229.google.com with SMTP id p75so2306820wmg.3 for ; Wed, 25 Oct 2017 07:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=d2y7OKGFQgPiS58PPAPhERITAaFIGI/G4Eah8vI028A=; b=FTI4bTidcco3H6nx4e3biGsoEUlOfKThAGHitt+TB//L2MTetqcebhHzy/WUU4Dlkf gluiQbqE8NvW8edgYbAf30n2xEhBQ5WhccgtOfxsbQQqM/jsVHMa0HyE+bxUJ7BpzM56 gLkhE7u6sTejVuxlSxHSPA3IG6A6/661CLxME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d2y7OKGFQgPiS58PPAPhERITAaFIGI/G4Eah8vI028A=; b=kuJyi+yG/8OzGQbycC+IVRpqtnS2rEO5d7EPf5w0H5SK1TxpnLgQIRFRZKttaimu7c ewCO0TOhnhTTTprtTtbtytpwP00ULlIivJK1nfTFZq5zKEZs6Tn6fn4zjrwRFYgL7sfm mUZj5do9ovBNjQYAmANV9BpS51C6BsUBJvmCLaHmoZoia+VO8/+TJ1IG5pAhVUZtTARj X8UT9SyuESwJwCCu3Vw25DGII/1PgtpMK09SSBPp8w8Z87V2bdN3a1rUn9FPASwno9d0 7gt7cSsUGmF85e3tLr9GDvvPcGW7rKcNcPKjErj8b5LjZnBYqCbu8zpYiZRKRdS/+fFT coJA== X-Gm-Message-State: AMCzsaXy2/Qg/jL3u90vjIhMLvRnfrexjz24vVP40yKMPxHOPSpas1+A bFnG49c4NxZmdeGnE3TnVK1YquUZf4M= X-Google-Smtp-Source: ABhQp+T8oB1i4nARL9SnQ8EtAqBIXucDCfzgu7ZHTewI/i4s8US1Jyvj49jeJnGTN4H9qTDojvma6w== X-Received: by 10.28.69.8 with SMTP id s8mr1817682wma.65.1508942001011; Wed, 25 Oct 2017 07:33:21 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h185sm4520002wma.19.2017.10.25.07.33.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 07:33:19 -0700 (PDT) Date: Wed, 25 Oct 2017 15:33:18 +0100 From: Leif Lindholm To: evan.lloyd@arm.com Cc: edk2-devel@lists.01.org Message-ID: <20171025143318.wxg5vl27c4n7cefs@bivouac.eciton.net> References: <20170926201529.11644-1-evan.lloyd@arm.com> <20170926201529.11644-16-evan.lloyd@arm.com> MIME-Version: 1.0 In-Reply-To: <20170926201529.11644-16-evan.lloyd@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH 15/19] ArmPlatformPkg: PCD to swap red/blue format for HDLCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 14:29:37 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 26, 2017 at 09:15:25PM +0100, evan.lloyd@arm.com wrote: > From: Girish Pathak > > 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. > > If set to TRUE in the platform dsc, HDLCD driver will swap the values > while setting RED_SELECT and BLUE_SELECT registers. The default > value of the PCD is FALSE. > > NOTE: The motive for this is that a discrepancy in the Red/Blue lines > exists between some VersatileExpress platforms. Rather than have > divergent code, this build switch allows a simple, pragmatic solution. Notes are generally a better fit for under the first --- line. I have no other comments on this patch, so it's not worth updating it for, just to keep in mind for future. > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Girish Pathak > Signed-off-by: Evan Lloyd > --- > ArmPlatformPkg/ArmPlatformPkg.dec | 3 +++ > ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf | 1 + > ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcd.c | 4 ++++ > 3 files changed, 8 insertions(+) > > diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec > index 548d2b211753275337c6973e05227cee8451c185..77eb789ad8fe4ddcbf25abefad2e7b7d3d5e1722 100644 > --- a/ArmPlatformPkg/ArmPlatformPkg.dec > +++ b/ArmPlatformPkg/ArmPlatformPkg.dec > @@ -133,6 +133,9 @@ [PcdsFixedAtBuild.common] > # Default is set to UEFI console font format PixelBlueGreenRedReserved8BitPerColor > gArmPlatformTokenSpaceGuid.PcdGopPixelFormat|0x00000001|UINT32|0x00000040 > > + ## If set, this will swap settings for HDLCD RED_SELECT and BLUE_SELECT registers > + gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect|FALSE|BOOLEAN|0x00000045 > + > [PcdsFixedAtBuild.common,PcdsDynamic.common] > ## PL031 RealTimeClock > gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0|UINT32|0x00000024 > diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf > index 26e580a594fc328187407ac4c1787f180fbf4b17..b050add98e3f9cf62ac335883193b9d0928c3dc9 100644 > --- a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf > +++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf > @@ -55,6 +55,7 @@ [Protocols] > > [FixedPcd] > gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase > + gArmPlatformTokenSpaceGuid.PcdArmHdLcdSwapBlueRedSelect > > [FeaturePcd] > gArmPlatformTokenSpaceGuid.PcdGopDisableOnExitBootServices > diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcd.c b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcd.c > index 3ea7feca439e7ae9a610b6b3139ddbfad3ac6f9c..8f83d6ecba290994dbced1c11dfdb6d705323c03 100644 > --- a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcd.c > +++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcd.c > @@ -109,7 +109,11 @@ LcdSetMode ( > return Status; > } > > +#if (!FixedPcdGetBool (PcdArmHdLcdSwapBlueRedSelect)) > if (ModeInfo.PixelFormat == PixelBlueGreenRedReserved8BitPerColor) { > +#else > + if (ModeInfo.PixelFormat == PixelRedGreenBlueReserved8BitPerColor) { > +#endif > MmioWrite32 (HDLCD_REG_RED_SELECT, (8 << 8 | 16)); > MmioWrite32 (HDLCD_REG_BLUE_SELECT, (8 << 8 | 0)); > } else { > -- > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") >