mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
disp: msm: dp: log the status of the uevent
Log the status of the call to kobject_uevent_env so we know whether the uevent was sent successfully to the userspace. Change-Id: I4fd5f9b51d9771dab399e322d678411f824c8aba Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
parent
0545182f17
commit
3efe89facb
1 changed files with 11 additions and 4 deletions
|
|
@ -732,6 +732,7 @@ static void dp_display_send_hpd_event(struct dp_display_private *dp)
|
|||
char name[HPD_STRING_SIZE], status[HPD_STRING_SIZE],
|
||||
bpp[HPD_STRING_SIZE], pattern[HPD_STRING_SIZE];
|
||||
char *envp[5];
|
||||
int rc = 0;
|
||||
|
||||
if (dp->mst.mst_active) {
|
||||
DP_DEBUG("skip notification for mst mode\n");
|
||||
|
|
@ -757,6 +758,11 @@ static void dp_display_send_hpd_event(struct dp_display_private *dp)
|
|||
|
||||
dev = connector->dev;
|
||||
|
||||
if (dp->debug->skip_uevent) {
|
||||
DP_INFO("skipping uevent\n");
|
||||
goto update_state;
|
||||
}
|
||||
|
||||
snprintf(name, HPD_STRING_SIZE, "name=%s", connector->name);
|
||||
snprintf(status, HPD_STRING_SIZE, "status=%s",
|
||||
drm_get_connector_status_name(connector->status));
|
||||
|
|
@ -766,16 +772,17 @@ static void dp_display_send_hpd_event(struct dp_display_private *dp)
|
|||
snprintf(pattern, HPD_STRING_SIZE, "pattern=%d",
|
||||
dp->link->test_video.test_video_pattern);
|
||||
|
||||
DP_DEBUG("[%s]:[%s] [%s] [%s]\n", name, status, bpp, pattern);
|
||||
DP_INFO("[%s]:[%s] [%s] [%s]\n", name, status, bpp, pattern);
|
||||
envp[0] = name;
|
||||
envp[1] = status;
|
||||
envp[2] = bpp;
|
||||
envp[3] = pattern;
|
||||
envp[4] = NULL;
|
||||
if (!dp->debug->skip_uevent)
|
||||
kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE,
|
||||
envp);
|
||||
|
||||
rc = kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp);
|
||||
DP_INFO("uevent %s: %d\n", rc ? "failure" : "success", rc);
|
||||
|
||||
update_state:
|
||||
if (connector->status == connector_status_connected) {
|
||||
dp_display_state_add(DP_STATE_CONNECT_NOTIFIED);
|
||||
dp_display_state_remove(DP_STATE_DISCONNECT_NOTIFIED);
|
||||
|
|
|
|||
Loading…
Reference in a new issue