mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
osd: add osd dump cmd for drm
PD#152825: add osd dump cmd for drm Change-Id: I9557ee84cecf00036b6ed59819aedd8e53ec6693 Signed-off-by: pengcheng chen <pengcheng.chen@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
b99ebebc62
commit
5160004744
@@ -437,6 +437,28 @@ static ssize_t osd_clear_write_file(struct file *file,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t osd_dump_read_file(struct file *file,
|
||||
char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
char __iomem *buf;
|
||||
struct seq_file *s = file->private_data;
|
||||
int osd_id = *(int *)s;
|
||||
ssize_t len;
|
||||
|
||||
osd_restore_screen_info(osd_id, &buf, &len);
|
||||
if (buf && len)
|
||||
return simple_read_from_buffer(userbuf, count, ppos, buf, len);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t osd_dump_write_file(struct file *file,
|
||||
const char __user *userbuf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static const struct file_operations loglevel_file_ops = {
|
||||
@@ -509,6 +531,11 @@ static const struct file_operations osd_clear_file_ops = {
|
||||
.write = osd_clear_write_file,
|
||||
};
|
||||
|
||||
static const struct file_operations osd_dump_file_ops = {
|
||||
.open = simple_open,
|
||||
.read = osd_dump_read_file,
|
||||
.write = osd_dump_write_file,
|
||||
};
|
||||
|
||||
|
||||
struct osd_drm_debugfs_files_s {
|
||||
@@ -530,6 +557,7 @@ static struct osd_drm_debugfs_files_s osd_drm_debugfs_files[] = {
|
||||
{"order", S_IFREG | 0640, &osd_order_file_ops},
|
||||
{"osd_afbcd", S_IFREG | 0640, &osd_afbcd_file_ops},
|
||||
{"osd_clear", S_IFREG | 0220, &osd_clear_file_ops},
|
||||
{"osd_dump", S_IFREG | 0640, &osd_dump_file_ops},
|
||||
};
|
||||
|
||||
void osd_drm_debugfs_add(
|
||||
|
||||
@@ -4435,8 +4435,11 @@ static bool osd_direct_render(struct osd_plane_map_s *plane_map)
|
||||
void *vaddr = NULL;
|
||||
|
||||
phy_addr = phy_addr + plane_map->byte_stride * plane_map->src_y;
|
||||
vaddr = phys_to_virt(phy_addr);
|
||||
osd_hw.screen_base[index] = vaddr;
|
||||
osd_hw.screen_size[index] =
|
||||
plane_map->byte_stride * plane_map->src_h;
|
||||
if (osd_hw.osd_clear[index]) {
|
||||
vaddr = phys_to_virt(phy_addr);
|
||||
if (vaddr)
|
||||
memset(vaddr, 0x0,
|
||||
plane_map->byte_stride*plane_map->src_h);
|
||||
@@ -4616,8 +4619,11 @@ static void osd_cursor_move(struct osd_plane_map_s *plane_map)
|
||||
if (index != OSD2)
|
||||
return;
|
||||
phy_addr = phy_addr + plane_map->byte_stride * plane_map->src_y;
|
||||
vaddr = phys_to_virt(phy_addr);
|
||||
osd_hw.screen_base[index] = vaddr;
|
||||
osd_hw.screen_size[index] =
|
||||
plane_map->byte_stride * plane_map->src_h;
|
||||
if (osd_hw.osd_clear[index]) {
|
||||
vaddr = phys_to_virt(phy_addr);
|
||||
if (vaddr)
|
||||
memset(vaddr, 0x0,
|
||||
plane_map->byte_stride*plane_map->src_h);
|
||||
|
||||
Reference in New Issue
Block a user