mirror of
https://xff.cz/git/u-boot/
synced 2025-10-02 16:01:30 +02:00
chromebook_samus: Enable the copy framebuffer
Update the video driver to support this feature and enable it on samus. Also remove the multi-line scrolling since normal scrolling is fast enough now. With this change, the time taken to print the environment to the display without CONFIG_CONSOLE_SCROLL_LINES is reduced from about 430ms to 12ms. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -67,8 +67,8 @@ CONFIG_SPI=y
|
|||||||
CONFIG_TPM_TIS_LPC=y
|
CONFIG_TPM_TIS_LPC=y
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_USB_KEYBOARD=y
|
CONFIG_USB_KEYBOARD=y
|
||||||
|
CONFIG_VIDEO_COPY=y
|
||||||
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
|
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
|
||||||
CONFIG_FRAMEBUFFER_VESA_MODE_11A=y
|
CONFIG_FRAMEBUFFER_VESA_MODE_11A=y
|
||||||
CONFIG_CONSOLE_SCROLL_LINES=5
|
|
||||||
CONFIG_TPM=y
|
CONFIG_TPM=y
|
||||||
# CONFIG_GZIP is not set
|
# CONFIG_GZIP is not set
|
||||||
|
@@ -664,6 +664,7 @@ static int broadwell_igd_probe(struct udevice *dev)
|
|||||||
struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
|
struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
|
||||||
struct video_priv *uc_priv = dev_get_uclass_priv(dev);
|
struct video_priv *uc_priv = dev_get_uclass_priv(dev);
|
||||||
bool is_broadwell;
|
bool is_broadwell;
|
||||||
|
ulong fbbase;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!ll_boot_init()) {
|
if (!ll_boot_init()) {
|
||||||
@@ -690,7 +691,8 @@ static int broadwell_igd_probe(struct udevice *dev)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Use write-combining for the graphics memory, 256MB */
|
/* Use write-combining for the graphics memory, 256MB */
|
||||||
ret = mtrr_add_request(MTRR_TYPE_WRCOMB, plat->base, 256 << 20);
|
fbbase = IS_ENABLED(CONFIG_VIDEO_COPY) ? plat->copy_base : plat->base;
|
||||||
|
ret = mtrr_add_request(MTRR_TYPE_WRCOMB, fbbase, 256 << 20);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ret = mtrr_commit(true);
|
ret = mtrr_commit(true);
|
||||||
if (ret && ret != -ENOSYS) {
|
if (ret && ret != -ENOSYS) {
|
||||||
@@ -752,6 +754,17 @@ static int broadwell_igd_ofdata_to_platdata(struct udevice *dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int broadwell_igd_bind(struct udevice *dev)
|
||||||
|
{
|
||||||
|
struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev);
|
||||||
|
|
||||||
|
/* Set the maximum supported resolution */
|
||||||
|
uc_plat->size = 2560 * 1600 * 4;
|
||||||
|
log_debug("%s: Frame buffer size %x\n", __func__, uc_plat->size);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct video_ops broadwell_igd_ops = {
|
static const struct video_ops broadwell_igd_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -766,6 +779,7 @@ U_BOOT_DRIVER(broadwell_igd) = {
|
|||||||
.of_match = broadwell_igd_ids,
|
.of_match = broadwell_igd_ids,
|
||||||
.ops = &broadwell_igd_ops,
|
.ops = &broadwell_igd_ops,
|
||||||
.ofdata_to_platdata = broadwell_igd_ofdata_to_platdata,
|
.ofdata_to_platdata = broadwell_igd_ofdata_to_platdata,
|
||||||
|
.bind = broadwell_igd_bind,
|
||||||
.probe = broadwell_igd_probe,
|
.probe = broadwell_igd_probe,
|
||||||
.priv_auto_alloc_size = sizeof(struct broadwell_igd_priv),
|
.priv_auto_alloc_size = sizeof(struct broadwell_igd_priv),
|
||||||
.platdata_auto_alloc_size = sizeof(struct broadwell_igd_plat),
|
.platdata_auto_alloc_size = sizeof(struct broadwell_igd_plat),
|
||||||
|
Reference in New Issue
Block a user