diff options
Diffstat (limited to 'drivers/video/videomode.c')
-rw-r--r-- | drivers/video/videomode.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/video/videomode.c b/drivers/video/videomode.c index a3d95f263cd5..df375c96c5d3 100644 --- a/drivers/video/videomode.c +++ b/drivers/video/videomode.c | |||
@@ -11,15 +11,9 @@ | |||
11 | #include <video/display_timing.h> | 11 | #include <video/display_timing.h> |
12 | #include <video/videomode.h> | 12 | #include <video/videomode.h> |
13 | 13 | ||
14 | int videomode_from_timing(const struct display_timings *disp, | 14 | void videomode_from_timing(const struct display_timing *dt, |
15 | struct videomode *vm, unsigned int index) | 15 | struct videomode *vm) |
16 | { | 16 | { |
17 | struct display_timing *dt; | ||
18 | |||
19 | dt = display_timings_get(disp, index); | ||
20 | if (!dt) | ||
21 | return -EINVAL; | ||
22 | |||
23 | vm->pixelclock = dt->pixelclock.typ; | 17 | vm->pixelclock = dt->pixelclock.typ; |
24 | vm->hactive = dt->hactive.typ; | 18 | vm->hactive = dt->hactive.typ; |
25 | vm->hfront_porch = dt->hfront_porch.typ; | 19 | vm->hfront_porch = dt->hfront_porch.typ; |
@@ -32,7 +26,20 @@ int videomode_from_timing(const struct display_timings *disp, | |||
32 | vm->vsync_len = dt->vsync_len.typ; | 26 | vm->vsync_len = dt->vsync_len.typ; |
33 | 27 | ||
34 | vm->flags = dt->flags; | 28 | vm->flags = dt->flags; |
29 | } | ||
30 | EXPORT_SYMBOL_GPL(videomode_from_timing); | ||
31 | |||
32 | int videomode_from_timings(const struct display_timings *disp, | ||
33 | struct videomode *vm, unsigned int index) | ||
34 | { | ||
35 | struct display_timing *dt; | ||
36 | |||
37 | dt = display_timings_get(disp, index); | ||
38 | if (!dt) | ||
39 | return -EINVAL; | ||
40 | |||
41 | videomode_from_timing(dt, vm); | ||
35 | 42 | ||
36 | return 0; | 43 | return 0; |
37 | } | 44 | } |
38 | EXPORT_SYMBOL_GPL(videomode_from_timing); | 45 | EXPORT_SYMBOL_GPL(videomode_from_timings); |