Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/77626?usp=email )
Change subject: drivers/aspeed/common/ast_{drv;mode}: Drop unused arry ......................................................................
drivers/aspeed/common/ast_{drv;mode}: Drop unused arry
Replace 'u32 cpp[1]" with u32 cpp as only the 1st element is used.
Change-Id: Ib6e1f654d06090429a1e2f64632d28c1642f9d48 Signed-off-by: Elyes Haouas ehaouas@noos.fr --- M src/drivers/aspeed/common/ast_drv.h M src/drivers/aspeed/common/ast_mode.c M src/drivers/aspeed/common/ast_mode_corebootfb.c 3 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/77626/1
diff --git a/src/drivers/aspeed/common/ast_drv.h b/src/drivers/aspeed/common/ast_drv.h index 423ba37..681c791 100644 --- a/src/drivers/aspeed/common/ast_drv.h +++ b/src/drivers/aspeed/common/ast_drv.h @@ -249,7 +249,7 @@ };
struct drm_format { - u32 cpp[1]; /* Colors per pixel */ + u32 cpp; /* Colors per pixel */ };
struct drm_framebuffer { diff --git a/src/drivers/aspeed/common/ast_mode.c b/src/drivers/aspeed/common/ast_mode.c index 3ab91c2..af23367 100644 --- a/src/drivers/aspeed/common/ast_mode.c +++ b/src/drivers/aspeed/common/ast_mode.c @@ -39,7 +39,7 @@ u32 hborder, vborder; bool check_sync;
- switch (fb->format->cpp[0] * 8) { + switch (fb->format->cpp * 8) { case 8: vbios_mode->std_table = &vbios_stdtable[VGAModeIndex]; color_index = VGAModeIndex - 1; @@ -163,7 +163,7 @@ if (vbios_mode->enh_table->flags & NewModeInfo) { ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x91, 0xa8); ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x92, - fb->format->cpp[0] * 8); + fb->format->cpp * 8); ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x93, adjusted_mode->clock / 1000); ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x94, @@ -190,7 +190,7 @@ u32 i; u8 jreg;
- switch (fb->format->cpp[0] * 8) { + switch (fb->format->cpp * 8) { case 8: stdtable = &vbios_stdtable[VGAModeIndex]; break; @@ -386,7 +386,7 @@ const struct drm_framebuffer *fb = crtc->primary->fb; u8 jregA0 = 0, jregA3 = 0, jregA8 = 0;
- switch (fb->format->cpp[0] * 8) { + switch (fb->format->cpp * 8) { case 8: jregA0 = 0x70; jregA3 = 0x01; diff --git a/src/drivers/aspeed/common/ast_mode_corebootfb.c b/src/drivers/aspeed/common/ast_mode_corebootfb.c index 6c63931..712b421 100644 --- a/src/drivers/aspeed/common/ast_mode_corebootfb.c +++ b/src/drivers/aspeed/common/ast_mode_corebootfb.c @@ -186,7 +186,7 @@ /* Init wrapper structs */ connector.dev = dev;
- format.cpp[0] = 4; /* 32 BPP */ + format.cpp = 4; /* 32 BPP */ fb.format = &format;
primary.fb = &fb; @@ -204,8 +204,8 @@ /* Updated edid for fb_fill_framebuffer_info */ edid.x_resolution = edid.mode.ha; edid.y_resolution = edid.mode.va; - edid.framebuffer_bits_per_pixel = format.cpp[0] * 8; - edid.bytes_per_line = ALIGN_UP(edid.x_resolution * format.cpp[0], 8); + edid.framebuffer_bits_per_pixel = format.cpp * 8; + edid.bytes_per_line = ALIGN_UP(edid.x_resolution * format.cpp, 8);
/* Updated framebuffer info for ast_crtc_mode_set */ fb.pitches[0] = edid.bytes_per_line;