mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/vc4: hvs: Remove incorrect limit from hvs_dlist debugfs function
[ Upstream commit d285bb622ebdfaa84f51df3a1abccb87036157ea ]
The debugfs function to dump dlists aborted at 256 bytes,
when actually the dlist memory is generally significantly
larger but varies based on SoC.
We already have the correct limit in __vc4_hvs_alloc, so
store it for use in the debugfs dlist function.
Fixes: c6dac00340 ("drm/vc4: hvs: Add debugfs node that dumps the current display lists")
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-19-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
253ccf145b
commit
151bec2fd0
@@ -323,6 +323,7 @@ struct vc4_hvs {
|
|||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
u32 __iomem *dlist;
|
u32 __iomem *dlist;
|
||||||
|
unsigned int dlist_mem_size;
|
||||||
|
|
||||||
struct clk *core_clk;
|
struct clk *core_clk;
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ static int vc4_hvs_debugfs_dlist(struct seq_file *m, void *data)
|
|||||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||||
struct vc4_hvs *hvs = vc4->hvs;
|
struct vc4_hvs *hvs = vc4->hvs;
|
||||||
struct drm_printer p = drm_seq_file_printer(m);
|
struct drm_printer p = drm_seq_file_printer(m);
|
||||||
|
unsigned int dlist_mem_size = hvs->dlist_mem_size;
|
||||||
unsigned int next_entry_start;
|
unsigned int next_entry_start;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
u32 dlist_word, dispstat;
|
u32 dlist_word, dispstat;
|
||||||
@@ -124,7 +125,7 @@ static int vc4_hvs_debugfs_dlist(struct seq_file *m, void *data)
|
|||||||
drm_printf(&p, "HVS chan %u:\n", i);
|
drm_printf(&p, "HVS chan %u:\n", i);
|
||||||
next_entry_start = 0;
|
next_entry_start = 0;
|
||||||
|
|
||||||
for (j = HVS_READ(SCALER_DISPLISTX(i)); j < 256; j++) {
|
for (j = HVS_READ(SCALER_DISPLISTX(i)); j < dlist_mem_size; j++) {
|
||||||
dlist_word = readl((u32 __iomem *)vc4->hvs->dlist + j);
|
dlist_word = readl((u32 __iomem *)vc4->hvs->dlist + j);
|
||||||
drm_printf(&p, "dlist: %02d: 0x%08x\n", j,
|
drm_printf(&p, "dlist: %02d: 0x%08x\n", j,
|
||||||
dlist_word);
|
dlist_word);
|
||||||
@@ -827,9 +828,10 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
|
|||||||
* our 16K), since we don't want to scramble the screen when
|
* our 16K), since we don't want to scramble the screen when
|
||||||
* transitioning from the firmware's boot setup to runtime.
|
* transitioning from the firmware's boot setup to runtime.
|
||||||
*/
|
*/
|
||||||
|
hvs->dlist_mem_size = (SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END;
|
||||||
drm_mm_init(&hvs->dlist_mm,
|
drm_mm_init(&hvs->dlist_mm,
|
||||||
HVS_BOOTLOADER_DLIST_END,
|
HVS_BOOTLOADER_DLIST_END,
|
||||||
(SCALER_DLIST_SIZE >> 2) - HVS_BOOTLOADER_DLIST_END);
|
hvs->dlist_mem_size);
|
||||||
|
|
||||||
/* Set up the HVS LBM memory manager. We could have some more
|
/* Set up the HVS LBM memory manager. We could have some more
|
||||||
* complicated data structure that allowed reuse of LBM areas
|
* complicated data structure that allowed reuse of LBM areas
|
||||||
|
|||||||
Reference in New Issue
Block a user