Hello all,
We are currently doing some work on TX2 display framebuffer.
We’ve checked the Park_TRM, chapter 20 said that, the Parker Series Soc support Tiling Formats include Pitch Linear and Block Linear. But when we read the driver code of tegra dc in l4t, we can’t find the code pieces about the tiling formats settings.
In the function “tegra_dc_update_windows” in “kernel/nvidia/drivers/video/tegra/dc/window.c”, we believed that the t186 called the function “tegra_nvdisp_update_windows”, and the codes below in function “tegra_nvdisp_win_attribute” may set the reg about the win’s tiling formats
if (WIN_IS_BLOCKLINEAR(win)) {
nvdisp_win_write(win, win_surface_kind_kind_bl_f() |
win_surface_kind_block_height_f(win->block_height_log2),
win_surface_kind_r());
} else if (WIN_IS_TILED(win)) {
nvdisp_win_write(win, win_surface_kind_kind_tiled_f(),
win_surface_kind_r());
} else {
nvdisp_win_write(win, win_surface_kind_kind_pitch_f(),
win_surface_kind_r());
}
the win’s flags property is passed by the caller in “tegra_dc_ioctl”, under cmd type
TEGRA_DC_EXT_FLIP4, but how can we tell the caller(which we believed is the GPU) to switch the tiling formats to “Pitch Linear”? Is it supported in the nvdisplay driver of Parker?
We have found that in “tegra_dc_ext_control_ioctl” of cmd “TEGRA_DC_EXT_CONTROL_GET_CAPABILITIES”, the caller may get capabilities of dc, we’ve tried to delete the capabilities "TEGRA_DC_EXT_CAPABILITIES_BLOCKLINEAR "and “TEGRA_DC_EXT_CAPABILITIES_NVDISPLAY” ( which value is 1<<5), but it did not work, after the change we can only see the cursor on the screen.
static int get_capabilities(struct tegra_dc_ext_control_capabilities *caps)
{
caps->caps = TEGRA_DC_EXT_CAPABILITIES_CURSOR_MODE |
TEGRA_DC_EXT_CAPABILITIES_BLOCKLINEAR |
TEGRA_DC_EXT_CAPABILITIES_CURSOR_TWO_COLOR;
if (tegra_dc_is_nvdisplay())
caps->caps |= TEGRA_DC_EXT_CAPABILITIES_NVDISPLAY;
return 0;
}
By the way, does function “tegra_nvdisp_update_windows” support partial_update,(just like the _tegra_dc_program_windows do )? we just find the annotations below:
/* if (do_partial_update) { */
/* /\* calculate the xoff, yoff etc values *\/ */
/* tegra_dc_win_partial_update(dc, win, xoff, yoff, */
/* width, height); */
/* } */