disp: msm: dp: add ability to select pattern for tpg
Currently the tpg_ctrl node takes a boolean flag to enable or disable test pattern output on DP controller. It always sets the pattern type to a default pattern. This change updates this interface to accept an integer value so the user can select different patterns supported by the controller. Change-Id: I399091a57f353b2fb8d29a48a8390898ca9afb55 Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -2074,7 +2075,7 @@ static void dp_panel_handle_sink_request(struct dp_panel *dp_panel)
|
||||
}
|
||||
}
|
||||
|
||||
static void dp_panel_tpg_config(struct dp_panel *dp_panel, bool enable)
|
||||
static void dp_panel_tpg_config(struct dp_panel *dp_panel, u32 pattern)
|
||||
{
|
||||
u32 hsync_start_x, hsync_end_x, hactive;
|
||||
struct dp_catalog_panel *catalog;
|
||||
@@ -2100,8 +2101,8 @@ static void dp_panel_tpg_config(struct dp_panel *dp_panel, bool enable)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!enable) {
|
||||
panel->catalog->tpg_config(catalog, false);
|
||||
if (!pattern) {
|
||||
panel->catalog->tpg_config(catalog, pattern);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2132,7 +2133,7 @@ static void dp_panel_tpg_config(struct dp_panel *dp_panel, bool enable)
|
||||
pinfo->h_sync_width;
|
||||
catalog->display_hctl = (hsync_end_x << 16) | hsync_start_x;
|
||||
|
||||
panel->catalog->tpg_config(catalog, true);
|
||||
panel->catalog->tpg_config(catalog, pattern);
|
||||
}
|
||||
|
||||
static int dp_panel_config_timing(struct dp_panel *dp_panel)
|
||||
|
Reference in New Issue
Block a user