public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Girish Pathak <Girish.Pathak@arm.com>,
	edk2-devel <edk2-devel@lists.01.org>,
	"ryan.harkin@linaro.org" <ryan.harkin@linaro.org>,
	Evan Lloyd <Evan.Lloyd@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>,
	Alexei Fedorov <Alexei.Fedorov@arm.com>
Subject: Re: ArmPlatformPkg: LcdGraphicsOutputDxe, PL111, and HdLcd rejig
Date: Thu, 4 May 2017 14:34:09 +0100	[thread overview]
Message-ID: <5D22060A-68B9-4632-A884-07220A737BA9@linaro.org> (raw)
In-Reply-To: <20170504111458.GU1657@bivouac.eciton.net>


> On 4 May 2017, at 12:14, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> 
> Hi Girish,
> 
>> On Wed, May 03, 2017 at 04:58:33PM +0000, Girish Pathak wrote:
>> With a view to an upcoming change, we have been examining the current Graphics
>> Output Protocol implementation. Currently for, ARM platforms, the UEFI Graphics
>> Output Protocol is implemented using a platform specific Library
>> (PL111LcdArmVExpressLib/HdLcdArmVExpressLib) and a DXE driver
>> (PL111LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe). The platform specific
>> library handles platform specific variations such as platform supported display
>> modes, memory management of the frame buffer, and clock/mux setting. The DXE
>> driver implements the GOP protocol and manages the respective display IP.
>> Although this implementation works fine for current platforms, we think the way
>> the current DXE driver sources are linked is sub-optimal and can be improved to
>> meet recommendation of the EDKII Module Writer's Guide.
> 
> The real improvement is the reduction in code duplication.
> 

Perhaps we shoukd move to the UEFI driver model at the same time?

>> The DXE driver source contains three source files per driver. The files
>> LcdGraphicsOutputDxe.c and LcdGraphicsOutputBlt.c implement common
>> functionality whereas HdLcd.c/PL111Lcd.c  implement display IP specific part of
>> the DXE. The problem is, there are two .inf files for HdLcdGraphicsOutputDxe
>> and PL111LcdGraphicsOutputDxe and both link common code LcdGraphicsOutputDxe.c
>> and LcdGraphicsOutputBlt.c with display IP source instead of a library instance
>> , which seems incorrect and can be improved. We propose to separate HdLcd.c
>> and PL111Lcd.c and create independent libraries managing only respective
>> display IP which can then be instantiated as LcdHwLib and linked in a common
>> LcdGraphicsOutputDxe DXE driver. This will help to clearly partition
>> implementation of the Graphics Output Protocol into three separate components,
>> a platform specific component for the display IP, a display IP specific
>> component and GOP common code.
> 
> This all sounds imminently sensible. One request for clarifiation below.
> 
>> So instead of the current structure in ArmPlatformPkg for display DXE:
>> 
>>  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf    (HDLCD GOP DXE)
>>  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf    (PL111 GOP DXE)
>> 
>> We propose a structure like:
>> 
>>  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf    (GOP DXE independent of hardware/platform)
> 
> Are we expecting this one to be truly independent, or simply common
> between most/all ARM Ltd. display controllers?
> 
>>  ArmPlatformPkg/Drivers/HdLcd/HdLcd.inf    (Library code managing HDLCD HW IP)
>>  ArmPlatformPkg/Drivers/PL111/PL11Lcd.inf    (Library code managing PL111 HW IP)
>> 
>> LcdGraphicsOutputDxe.inf will link to LcdPlatformLib and LcdHwLib which can be
>> selected for the platform in the platform specific .dsc file.
>> 
>> e.g.
>> 
>> Under LibraryClasses we might have:
>>    LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpressLib.inf
>>    LcdHwLib|ArmPlatformPkg/Drivers/HdLcd/HdLcd.inf
>> 
>> And Under Components:
>>    ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf  (Common GOP DXE code for ARM Platforms)
>> 
>> This is a significant change and we would like to invite viewpoints before we
>> proceed with implementing these. Since the change would only be with respect to
>> display aspects of ArmPlatformPkg we don't foresee any impact on any other
>> functionality.
>> 
>> Please reply if you feel this intended change might impact you and why ?
>> Unless objections are raised, we will soon submit the patches for review.
> 
> Sounds good to me.
> 
> Regards,
> 
> Leif


  reply	other threads:[~2017-05-04 13:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 16:58 ArmPlatformPkg: LcdGraphicsOutputDxe, PL111, and HdLcd rejig Girish Pathak
2017-05-04 11:14 ` Leif Lindholm
2017-05-04 13:34   ` Ard Biesheuvel [this message]
2017-05-04 14:49     ` Evan Lloyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D22060A-68B9-4632-A884-07220A737BA9@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox