Files
fml13v01-buildroot/package/starfive/v4l2_test/stf_framebuffer.h
T
mason.huo cf9c62a4f1 package: Move v4l2test to starfive package
1.Create starfive package, and move v4l2test into it.
2.Sync the latest v4l2test package from JH7100.

Signed-off-by: mason.huo <mason.huo@starfivetech.com>

(cherry-pick commit 87583e4004ba7ceefa317d939ea8004f38eb9570 from jh7110-mm-devel branch)
2022-06-10 10:49:06 +08:00

47 lines
1.1 KiB
C

// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 StarFive Technology Co., Ltd.
*/
#ifndef __STF_FRAMEBUFFER_H__
#define __STF_FRAMEBUFFER_H__
#include <linux/fb.h>
#include <stdbool.h>
#include "common.h"
struct pp_video_mode {
enum COLOR_FORMAT format;
unsigned int height;
unsigned int width;
unsigned int addr;
};
struct pp_mode {
char pp_id;
bool bus_out; /*out to ddr*/
bool fifo_out; /*out to lcdc*/
bool inited;
struct pp_video_mode src;
struct pp_video_mode dst;
};
typedef struct FBParam_t {
int fd;
int stfbc_fd;
struct fb_var_screeninfo vinfo;
struct fb_fix_screeninfo finfo;
uint8_t *screen_buf;
uint32_t screen_size;
int pixformat; // default COLOR_YUV420_NV21
uint32_t width; // default 1920
uint32_t height; // default 1080
uint32_t bpp;
} FBParam_t;
extern void stf_fb_open(FBParam_t *param, char *device_name, char *stfbc_name);
extern void stf_fb_close(FBParam_t *param);
extern void stf_fb_init(FBParam_t *param, uint32_t v4l2_fmt);
extern void stf_fb_uninit(FBParam_t *param);
#endif // __STF_FRAMEBUFFER_H__