Commit c6851841 authored by Eryk Brol's avatar Eryk Brol Committed by Alex Deucher

drm/amd/display: Fix naming of DSC Debugfs entry

[why]
Fix naming and return bits rather than bytes per pixel for
naming consistency. Because registers return Bytes per pixel,
but DSC Config structure is expecting bits per pixel as input.
So when returning the value convert from bytes into bits.
Signed-off-by: default avatarEryk Brol <eryk.brol@amd.com>
Signed-off-by: default avatarMikita Lipski <mikita.lipski@amd.com>
Reviewed-by: default avatarMikita Lipski <Mikita.Lipski@amd.com>
Acked-by: default avatarEryk Brol <eryk.brol@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5e061a4d
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "dmub/dmub_srv.h" #include "dmub/dmub_srv.h"
#include "resource.h" #include "resource.h"
#include "dsc.h" #include "dsc.h"
#include "dc_link_dp.h"
struct dmub_debugfs_trace_header { struct dmub_debugfs_trace_header {
uint32_t entry_count; uint32_t entry_count;
...@@ -1150,7 +1151,7 @@ static ssize_t dp_dsc_slice_height_read(struct file *f, char __user *buf, ...@@ -1150,7 +1151,7 @@ static ssize_t dp_dsc_slice_height_read(struct file *f, char __user *buf,
return result; return result;
} }
static ssize_t dp_dsc_bytes_per_pixel_read(struct file *f, char __user *buf, static ssize_t dp_dsc_bits_per_pixel_read(struct file *f, char __user *buf,
size_t size, loff_t *pos) size_t size, loff_t *pos)
{ {
char *rd_buf = NULL; char *rd_buf = NULL;
...@@ -1460,9 +1461,9 @@ static const struct file_operations dp_dsc_slice_height_debugfs_fops = { ...@@ -1460,9 +1461,9 @@ static const struct file_operations dp_dsc_slice_height_debugfs_fops = {
.llseek = default_llseek .llseek = default_llseek
}; };
static const struct file_operations dp_dsc_bytes_per_pixel_debugfs_fops = { static const struct file_operations dp_dsc_bits_per_pixel_debugfs_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dp_dsc_bytes_per_pixel_read, .read = dp_dsc_bits_per_pixel_read,
.llseek = default_llseek .llseek = default_llseek
}; };
...@@ -1552,7 +1553,7 @@ static const struct { ...@@ -1552,7 +1553,7 @@ static const struct {
{"dsc_clock_en", &dp_dsc_clock_en_debugfs_fops}, {"dsc_clock_en", &dp_dsc_clock_en_debugfs_fops},
{"dsc_slice_width", &dp_dsc_slice_width_debugfs_fops}, {"dsc_slice_width", &dp_dsc_slice_width_debugfs_fops},
{"dsc_slice_height", &dp_dsc_slice_height_debugfs_fops}, {"dsc_slice_height", &dp_dsc_slice_height_debugfs_fops},
{"dsc_bytes_per_pixel", &dp_dsc_bytes_per_pixel_debugfs_fops}, {"dsc_bits_per_pixel", &dp_dsc_bits_per_pixel_debugfs_fops},
{"dsc_pic_width", &dp_dsc_pic_width_debugfs_fops}, {"dsc_pic_width", &dp_dsc_pic_width_debugfs_fops},
{"dsc_pic_height", &dp_dsc_pic_height_debugfs_fops}, {"dsc_pic_height", &dp_dsc_pic_height_debugfs_fops},
{"dsc_chunk_size", &dp_dsc_chunk_size_debugfs_fops}, {"dsc_chunk_size", &dp_dsc_chunk_size_debugfs_fops},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment