Re: [PATCH] drm/msm/dsi: add support for dsi test pattern generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marijn

Sorry for the late response.

On 2021-07-13 02:10, Marijn Suijten wrote:
On 6/29/21 9:04 PM, Abhinav Kumar wrote:
During board bringups its useful to have a DSI test pattern
generator to isolate a DPU vs a DSI issue and focus on the relevant
hardware block.

To facilitate this, add an API which triggers the DSI controller
test pattern. The expected output is a rectangular checkered pattern.

This has been validated on a single DSI video mode panel by calling it
right after drm_panel_enable() which is also the ideal location to use
this as the DSI host and the panel have been initialized by then.

Further validation on dual DSI and command mode panel is pending.
If there are any fix ups needed for those, it shall be applied on top
of this change.

Signed-off-by: Abhinav Kumar <abhinavk@xxxxxxxxxxxxxx>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>


Tested-by: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>

[...]
Thanks for testing this.
+static void msm_dsi_host_cmd_test_pattern_setup(struct msm_dsi_host *msm_host)
+{
+	u32 reg;
+
+	reg = dsi_read(msm_host, REG_DSI_TEST_PATTERN_GEN_CTRL);
+
+ dsi_write(msm_host, REG_DSI_TEST_PATTERN_GEN_CMD_MDP_INIT_VAL0, 0xff);
+
+	reg |= (0x3 << 0x8);
+	dsi_write(msm_host, REG_DSI_TEST_PATTERN_GEN_CTRL, reg);
+	/* draw checkered rectangle pattern */
+	dsi_write(msm_host, REG_DSI_TPG_MAIN_CONTROL2, (0x1 << 0x7));


How about BIT(7)?

You mean BIT(7) of REG_DSI_TPG_MAIN_CONTROL2? Thats what this is right?
Did you mean some other bit?


On SM6125 this seems to change the color intensity of the pattern; it
is always colored lines of a few pixels wide alternating R, B and G
from left to right.  Is it possible to document the meaning and
available values of these registers, especially if they differ between
SoC / DSI block?


I have requested access for SM6125, will check this register on that to see if there
is any difference.

Are you saying you are not seeing a rectangular checkered pattern while testing?
Also are you testing on command mode or video mode?

As requested by Rob, I will add the bit definitions and update the dsi.xml.h in the
next patchset for the registers and the bits which I am using here.

With that the meaning of these bits will be more clear.

I dont think I will be able to document all the bits because the goal of this patch was only to draw a test pattern to help with validation. Different bits of the REG_DSI_TPG_MAIN_CONTROL2 register only draw different patterns so the goal wasnt that we can draw any pattern, it was just to
draw some pattern on the screen.

When we add support for all other patterns, we can expose those bits as well but it should not
be required in my opinion.

Kind regards,
Marijn

+	DBG("Cmd test pattern setup done\n");
+}
[...]



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux