[U-Boot] [PATCH 07/12] dm: x86: video: Add a driver-model driver for ivybridge graphics
Simon Glass
sjg at chromium.org
Thu Oct 6 04:43:39 CEST 2016
Hi Bin,
On 5 October 2016 at 03:20, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Simon,
>
> On Mon, Oct 3, 2016 at 11:12 AM, Simon Glass <sjg at chromium.org> wrote:
>> At present we use the legacy vesa driver for graphics. Add a driver which
>> supports driver model. This can be probed only when needed, removing the
>> need to start up the display if it is not used.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>> drivers/video/Kconfig | 12 +
>> drivers/video/Makefile | 1 +
>> drivers/video/ivybridge.c | 842 ++++++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 855 insertions(+)
>> create mode 100644 drivers/video/ivybridge.c
>>
>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>> index 97dbb64..fd26690 100644
>> --- a/drivers/video/Kconfig
>> +++ b/drivers/video/Kconfig
>> @@ -374,6 +374,18 @@ config VIDEO_BROADWELL_IGD
>> a special tool which configures the VGA ROM, but the graphics
>> resolution can be selected in U-Boot.
>>
>> +config VIDEO_IVYBRIDGE_IGD
>> + bool "Enable Intel Ivybridge integration graphics support"
>> + depends on X86
>> + help
>> + This enables support for integrated graphics on Intel ivybridge
>> + devices. Initialisation is mostly performed by a VGA boot ROM, with
>> + some setup handled by U-Boot itself. The graphics adaptor works as
>> + a VESA device and supports LCD panels, eDP and LVDS outputs.
>> + Configuration of most aspects of device operation is performed using
>> + a special tool which configures the VGA ROM, but the graphics
>> + resolution can be selected in U-Boot.
>> +
>> config VIDEO_ROCKCHIP
>> bool "Enable Rockchip video support"
>> depends on DM_VIDEO
>> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
>> index 3f045fe..2fc88b0 100644
>> --- a/drivers/video/Makefile
>> +++ b/drivers/video/Makefile
>> @@ -20,6 +20,7 @@ obj-$(CONFIG_CONSOLE_TRUETYPE) += console_truetype.o fonts/
>> endif
>>
>> obj-$(CONFIG_VIDEO_BROADWELL_IGD) += broadwell_igd.o
>> +obj-$(CONFIG_VIDEO_IVYBRIDGE_IGD) += ivybridge.o
>
> Like broadwell_igd.c, should this be ivybridge_igd.c?
>
>>
>> obj-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o videomodes.o
>> obj-$(CONFIG_ATMEL_HLCD) += atmel_hlcdfb.o
>> diff --git a/drivers/video/ivybridge.c b/drivers/video/ivybridge.c
>> new file mode 100644
>> index 0000000..751c9a0
>> --- /dev/null
>> +++ b/drivers/video/ivybridge.c
>> @@ -0,0 +1,842 @@
>> +1/*
>> + * Copyright (C) 2016 Google, Inc
>> + *
>> + * SPDX-License-Identifier: GPL-2.0
>> + */
>> +
>> +#include <common.h>
>> +#include <bios_emul.h>
>> +#include <dm.h>
>> +#include <errno.h>
>> +#include <fdtdec.h>
>> +#include <pci_rom.h>
>> +#include <vbe.h>
>> +#include <asm/intel_regs.h>
>> +#include <asm/io.h>
>> +#include <asm/mtrr.h>
>> +#include <asm/pci.h>
>> +#include <asm/arch/pch.h>
>> +#include <asm/arch/sandybridge.h>
>> +
>> +struct gt_powermeter {
>> + u16 reg;
>> + u32 value;
>> +};
>> +
>
> I know these magic numbers may be inevitable, but if we can put some
> comments here that would be great.
Unfortunately I don't have any details. I've added a comment in v2.
Regards,
Simon
More information about the U-Boot
mailing list