Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d83e98fd authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 870afd06 on remote branch

Change-Id: Ib54065820d1a13f39f26b76a5ac8ef8bdeb34fb7
parents 02a0d82c 870afd06
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -113,7 +113,7 @@ static int drm_dp_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
				    u32 signal_free_time, struct cec_msg *msg)
				    u32 signal_free_time, struct cec_msg *msg)
{
{
	struct drm_dp_aux *aux = cec_get_drvdata(adap);
	struct drm_dp_aux *aux = cec_get_drvdata(adap);
	unsigned int retries = min(5, attempts - 1);
	unsigned int retries = min(2, attempts - 1);
	ssize_t err;
	ssize_t err;


	err = drm_dp_dpcd_write(aux, DP_CEC_TX_MESSAGE_BUFFER,
	err = drm_dp_dpcd_write(aux, DP_CEC_TX_MESSAGE_BUFFER,
+14 −10
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -146,13 +147,6 @@ static void dp_display_hdcp_cb_work(struct work_struct *work)


	dp = container_of(dw, struct dp_display_private, hdcp_cb_work);
	dp = container_of(dw, struct dp_display_private, hdcp_cb_work);


	dp_display_update_hdcp_info(dp);

	if (!dp_display_is_hdcp_enabled(dp))
		return;

	dp->link->hdcp_status.hdcp_state = HDCP_STATE_AUTHENTICATING;

	rc = dp->catalog->ctrl.read_hdcp_status(&dp->catalog->ctrl);
	rc = dp->catalog->ctrl.read_hdcp_status(&dp->catalog->ctrl);
	if (rc >= 0) {
	if (rc >= 0) {
		hdcp_auth_state = (rc >> 20) & 0x3;
		hdcp_auth_state = (rc >> 20) & 0x3;
@@ -474,13 +468,15 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,
		bool hpd)
		bool hpd)
{
{
	int ret = 0;
	int ret = 0;
	static int bootsplash_count;


	dp->dp_display.is_connected = hpd;
	dp->dp_display.is_connected = hpd;


	if (!dp_display_framework_ready(dp)) {
	if (!dp_display_framework_ready(dp)) {
		pr_err("%s: dp display framework not ready\n", __func__);
		pr_err("%s: dp display framework not ready\n", __func__);
		if (!dp->dp_display.is_bootsplash_en) {
		if (!dp->dp_display.is_bootsplash_en && !bootsplash_count) {
			dp->dp_display.is_bootsplash_en = true;
			dp->dp_display.is_bootsplash_en = true;
			bootsplash_count++;
			drm_client_dev_register(dp->dp_display.drm_dev);
			drm_client_dev_register(dp->dp_display.drm_dev);
		}
		}
		return ret;
		return ret;
@@ -796,7 +792,7 @@ static int dp_display_usbpd_attention_cb(struct device *dev)
		return -ENODEV;
		return -ENODEV;
	}
	}


	if (dp->usbpd->hpd_high && dp->usbpd->hpd_irq)
	if (dp->usbpd->hpd_irq && dp->usbpd->hpd_high && !dp->power_on)
		drm_dp_cec_irq(dp->aux->drm_aux);
		drm_dp_cec_irq(dp->aux->drm_aux);


	if (dp->usbpd->hpd_irq && dp->usbpd->hpd_high &&
	if (dp->usbpd->hpd_irq && dp->usbpd->hpd_high &&
@@ -1150,6 +1146,11 @@ static int dp_display_post_enable(struct dp_display *dp_display)
		goto end;
		goto end;
	}
	}


	if (dp->dp_display.is_bootsplash_en) {
		dp->dp_display.is_bootsplash_en = false;
		goto end;
	}

	dp->panel->spd_config(dp->panel);
	dp->panel->spd_config(dp->panel);


	if (dp->audio_supported) {
	if (dp->audio_supported) {
@@ -1158,9 +1159,12 @@ static int dp_display_post_enable(struct dp_display *dp_display)
		dp->audio_status = dp->audio->on(dp->audio);
		dp->audio_status = dp->audio->on(dp->audio);
	}
	}


	if (dp->hdcp.feature_enabled && 0) { /* bootsplash check */
	dp_display_update_hdcp_info(dp);

	if (dp_display_is_hdcp_enabled(dp)) {
		cancel_delayed_work_sync(&dp->hdcp_cb_work);
		cancel_delayed_work_sync(&dp->hdcp_cb_work);


		dp->link->hdcp_status.hdcp_state = HDCP_STATE_AUTHENTICATING;
		queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ / 2);
		queue_delayed_work(dp->wq, &dp->hdcp_cb_work, HZ / 2);
	}
	}


+3 −0
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2012-2018,2020-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2018,2020-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -792,6 +793,8 @@ static int dp_link_parse_request(struct dp_link_private *link)


	pr_debug("device service irq vector = 0x%x\n", data);
	pr_debug("device service irq vector = 0x%x\n", data);


	drm_dp_cec_irq(link->aux->drm_aux);

	if (!(data & DP_AUTOMATED_TEST_REQUEST)) {
	if (!(data & DP_AUTOMATED_TEST_REQUEST)) {
		pr_debug("no test requested\n");
		pr_debug("no test requested\n");
		return 0;
		return 0;
+9 −5
Original line number Original line Diff line number Diff line
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -1274,10 +1275,13 @@ static int __cam_req_mgr_create_subdevs(
 *
 *
 */
 */
static void __cam_req_mgr_destroy_subdev(
static void __cam_req_mgr_destroy_subdev(
	struct cam_req_mgr_connected_device *l_device)
	struct cam_req_mgr_connected_device **l_device)
{
{
	kfree(l_device);
	CAM_DBG(CAM_CRM, "*l_device %pK", *l_device);
	l_device = NULL;
	if (*(l_device) != NULL) {
		kfree(*(l_device));
		*l_device = NULL;
	}
}
}


/**
/**
@@ -2374,7 +2378,7 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link)
			"Unlink for all devices was not successful");
			"Unlink for all devices was not successful");


	/* Free memory holding data of linked devs */
	/* Free memory holding data of linked devs */
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);


	/* Destroy the link handle */
	/* Destroy the link handle */
	rc = cam_destroy_device_hdl(link->link_hdl);
	rc = cam_destroy_device_hdl(link->link_hdl);
@@ -2537,7 +2541,7 @@ int cam_req_mgr_link(struct cam_req_mgr_link_info *link_info)
	mutex_unlock(&g_crm_core_dev->crm_lock);
	mutex_unlock(&g_crm_core_dev->crm_lock);
	return rc;
	return rc;
setup_failed:
setup_failed:
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);
create_subdev_failed:
create_subdev_failed:
	cam_destroy_device_hdl(link->link_hdl);
	cam_destroy_device_hdl(link->link_hdl);
	link_info->link_hdl = 0;
	link_info->link_hdl = 0;
+10 −6
Original line number Original line Diff line number Diff line
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -1614,10 +1615,13 @@ static int __cam_req_mgr_create_subdevs(
 *
 *
 */
 */
static void __cam_req_mgr_destroy_subdev(
static void __cam_req_mgr_destroy_subdev(
	struct cam_req_mgr_connected_device *l_device)
	struct cam_req_mgr_connected_device **l_device)
{
{
	kfree(l_device);
	CAM_DBG(CAM_CRM, "*l_device %pK", *l_device);
	l_device = NULL;
	if (*(l_device) != NULL) {
		kfree(*(l_device));
		*l_device = NULL;
	}
}
}


/**
/**
@@ -2806,7 +2810,7 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link)
	__cam_req_mgr_destroy_link_info(link);
	__cam_req_mgr_destroy_link_info(link);


	/* Free memory holding data of linked devs */
	/* Free memory holding data of linked devs */
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);


	/* Destroy the link handle */
	/* Destroy the link handle */
	rc = cam_destroy_device_hdl(link->link_hdl);
	rc = cam_destroy_device_hdl(link->link_hdl);
@@ -2969,7 +2973,7 @@ int cam_req_mgr_link(struct cam_req_mgr_ver_info *link_info)
	mutex_unlock(&g_crm_core_dev->crm_lock);
	mutex_unlock(&g_crm_core_dev->crm_lock);
	return rc;
	return rc;
setup_failed:
setup_failed:
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);
create_subdev_failed:
create_subdev_failed:
	cam_destroy_device_hdl(link->link_hdl);
	cam_destroy_device_hdl(link->link_hdl);
	link_info->u.link_info_v1.link_hdl = -1;
	link_info->u.link_info_v1.link_hdl = -1;
@@ -3078,7 +3082,7 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
	mutex_unlock(&g_crm_core_dev->crm_lock);
	mutex_unlock(&g_crm_core_dev->crm_lock);
	return rc;
	return rc;
setup_failed:
setup_failed:
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);
create_subdev_failed:
create_subdev_failed:
	cam_destroy_device_hdl(link->link_hdl);
	cam_destroy_device_hdl(link->link_hdl);
	link_info->u.link_info_v2.link_hdl = -1;
	link_info->u.link_info_v2.link_hdl = -1;
Loading