Message ID | 20170207125812.27167-1-icenowy@aosc.xyz |
---|---|
State | RFC |
Delegated to: | Alexander Graf |
Headers | show |
Hi, On 7 February 2017 at 05:58, Icenowy Zheng <icenowy@aosc.xyz> wrote: > Sometimes the GraphicDevice of cfb_console is useful at other place. > > Add a function to acquire it, so that the graphics hardware (especially > the framebuffer) can be reused. > > Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> > --- > drivers/video/cfb_console.c | 5 +++++ > include/video_fb.h | 2 ++ > 2 files changed, 7 insertions(+) Please can you use driver-model video instead. Regards, Simon
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index c0b1b8dc17..c80ed1646f 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2199,3 +2199,8 @@ int video_get_screen_columns(void) { return CONSOLE_COLS; } + +GraphicDevice *video_get_graphic_device(void) +{ + return pGD; +}; diff --git a/include/video_fb.h b/include/video_fb.h index b008853f30..29f2b24648 100644 --- a/include/video_fb.h +++ b/include/video_fb.h @@ -89,4 +89,6 @@ void video_set_lut ( unsigned char b /* blue */ ); +GraphicDevice *video_get_graphic_device(void); + #endif /*_VIDEO_FB_H_ */
Sometimes the GraphicDevice of cfb_console is useful at other place. Add a function to acquire it, so that the graphics hardware (especially the framebuffer) can be reused. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> --- drivers/video/cfb_console.c | 5 +++++ include/video_fb.h | 2 ++ 2 files changed, 7 insertions(+)