videomode: remove timing_entry_index
Display timing's fields have minimum, typical and maximum values. These can be accessed by using timing_entry_index enum, and display_timing_get_value() function. There's no real need for this extra complexity. The values can be accessed more easily by just using the min/typ/max fields. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
This commit is contained in:
@@ -20,16 +20,16 @@ int videomode_from_timing(const struct display_timings *disp,
|
||||
if (!dt)
|
||||
return -EINVAL;
|
||||
|
||||
vm->pixelclock = display_timing_get_value(&dt->pixelclock, TE_TYP);
|
||||
vm->hactive = display_timing_get_value(&dt->hactive, TE_TYP);
|
||||
vm->hfront_porch = display_timing_get_value(&dt->hfront_porch, TE_TYP);
|
||||
vm->hback_porch = display_timing_get_value(&dt->hback_porch, TE_TYP);
|
||||
vm->hsync_len = display_timing_get_value(&dt->hsync_len, TE_TYP);
|
||||
vm->pixelclock = dt->pixelclock.typ;
|
||||
vm->hactive = dt->hactive.typ;
|
||||
vm->hfront_porch = dt->hfront_porch.typ;
|
||||
vm->hback_porch = dt->hback_porch.typ;
|
||||
vm->hsync_len = dt->hsync_len.typ;
|
||||
|
||||
vm->vactive = display_timing_get_value(&dt->vactive, TE_TYP);
|
||||
vm->vfront_porch = display_timing_get_value(&dt->vfront_porch, TE_TYP);
|
||||
vm->vback_porch = display_timing_get_value(&dt->vback_porch, TE_TYP);
|
||||
vm->vsync_len = display_timing_get_value(&dt->vsync_len, TE_TYP);
|
||||
vm->vactive = dt->vactive.typ;
|
||||
vm->vfront_porch = dt->vfront_porch.typ;
|
||||
vm->vback_porch = dt->vback_porch.typ;
|
||||
vm->vsync_len = dt->vsync_len.typ;
|
||||
|
||||
vm->flags = dt->flags;
|
||||
|
||||
|
Reference in New Issue
Block a user