Merge "f_qc_rndis: Call rndis_ipa_init() from rndis_qc_bind()"
diff --git a/arch/arm64/boot/dts/qcom/msm8917-cdp.dtsi b/arch/arm64/boot/dts/qcom/msm8917-cdp.dtsi
index 7690931..761e2d2 100644
--- a/arch/arm64/boot/dts/qcom/msm8917-cdp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8917-cdp.dtsi
@@ -116,6 +116,8 @@
&dsi_truly_720_vid {
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
+ qcom,mdss-dsi-min-refresh-rate = <48>;
+ qcom,mdss-dsi-max-refresh-rate = <60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp";
};
diff --git a/arch/arm64/boot/dts/qcom/msm8917-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8917-mtp.dtsi
index 9a3b6dae..2330c76 100644
--- a/arch/arm64/boot/dts/qcom/msm8917-mtp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8917-mtp.dtsi
@@ -175,6 +175,8 @@
&dsi_truly_720_vid {
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
+ qcom,mdss-dsi-min-refresh-rate = <48>;
+ qcom,mdss-dsi-max-refresh-rate = <60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp";
};
diff --git a/arch/arm64/boot/dts/qcom/qcs605-lc-mtp-no-hdcp.dts b/arch/arm64/boot/dts/qcom/qcs605-lc-mtp-no-hdcp.dts
index 4348e580..513a28b 100644
--- a/arch/arm64/boot/dts/qcom/qcs605-lc-mtp-no-hdcp.dts
+++ b/arch/arm64/boot/dts/qcom/qcs605-lc-mtp-no-hdcp.dts
@@ -23,3 +23,47 @@
compatible = "qcom,qcs605-mtp", "qcom,qcs605", "qcom,mtp";
qcom,board-id = <8 8>;
};
+
+&mdss_mdp {
+ status = "disabled";
+};
+
+&sde_rscc {
+ status = "disabled";
+};
+
+&sde_wb {
+ status = "disabled";
+};
+
+&mdss_rotator {
+ status = "disabled";
+};
+
+&mdss_dsi0 {
+ status = "disabled";
+};
+
+&mdss_dsi_phy0 {
+ status = "disabled";
+};
+
+&sde_dp {
+ status = "disabled";
+};
+
+&mdss_dsi0_pll {
+ status = "disabled";
+};
+
+&mdss_dp_pll {
+ status = "disabled";
+};
+
+&ext_disp {
+ status = "disabled";
+};
+
+&ext_dsi_bridge_display {
+ status = "disabled";
+};
diff --git a/drivers/gpu/msm/adreno_a6xx_preempt.c b/drivers/gpu/msm/adreno_a6xx_preempt.c
index 132fb02..89965f2 100644
--- a/drivers/gpu/msm/adreno_a6xx_preempt.c
+++ b/drivers/gpu/msm/adreno_a6xx_preempt.c
@@ -232,6 +232,38 @@
return NULL;
}
+#define GMU_ACTIVE_STATE_RETRY_MAX 100
+
+static int adreno_gmu_wait_for_active(struct adreno_device *adreno_dev)
+{
+ unsigned int reg, num_retries = 0;
+ struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
+
+ if (!kgsl_gmu_isenabled(device))
+ return 0;
+
+ kgsl_gmu_regread(device,
+ A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE, ®);
+
+ while (reg != GPU_HW_ACTIVE) {
+ /* Wait for small time before trying again */
+ udelay(5);
+ kgsl_gmu_regread(device,
+ A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE, ®);
+
+ if (num_retries == GMU_ACTIVE_STATE_RETRY_MAX &&
+ reg != GPU_HW_ACTIVE) {
+ dev_err(adreno_dev->dev.dev,
+ "GMU failed to move to ACTIVE state: 0x%x\n",
+ reg);
+ return -ETIMEDOUT;
+ }
+ num_retries++;
+ }
+
+ return 0;
+}
+
void a6xx_preemption_trigger(struct adreno_device *adreno_dev)
{
struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
@@ -361,6 +393,23 @@
upper_32_bits(gpuaddr),
FENCE_STATUS_WRITEDROPPED1_MASK);
+ /*
+ * Above fence writes will make sure GMU comes out of
+ * IFPC state if its was in IFPC state but it doesn't
+ * guarantee that GMU FW actually moved to ACTIVE state
+ * i.e. wake-up from IFPC is complete.
+ * Wait for GMU to move to ACTIVE state before triggering
+ * preemption. This is require to make sure CP doesn't
+ * interrupt GMU during wake-up from IFPC.
+ */
+ if (adreno_gmu_wait_for_active(adreno_dev)) {
+ adreno_set_preempt_state(adreno_dev, ADRENO_PREEMPT_NONE);
+
+ adreno_set_gpu_fault(adreno_dev, ADRENO_GMU_FAULT);
+ adreno_dispatcher_schedule(device);
+ return;
+ }
+
adreno_dev->next_rb = next;
/* Start the timer to detect a stuck preemption */
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index d3bbea3..eb4c29d 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -1397,6 +1397,45 @@
kgsl_context_put(context);
break;
}
+ case KGSL_PROP_SECURE_BUFFER_ALIGNMENT:
+ {
+ unsigned int align;
+
+ if (param->sizebytes != sizeof(unsigned int)) {
+ result = -EINVAL;
+ break;
+ }
+ /*
+ * XPUv2 impose the constraint of 1MB memory alignment,
+ * on the other hand Hypervisor does not have such
+ * constraints. So driver should fulfill such
+ * requirements when allocating secure memory.
+ */
+ align = MMU_FEATURE(&dev_priv->device->mmu,
+ KGSL_MMU_HYP_SECURE_ALLOC) ? PAGE_SIZE : SZ_1M;
+
+ if (copy_to_user(param->value, &align, sizeof(align)))
+ result = -EFAULT;
+
+ break;
+ }
+ case KGSL_PROP_SECURE_CTXT_SUPPORT:
+ {
+ unsigned int secure_ctxt;
+
+ if (param->sizebytes != sizeof(unsigned int)) {
+ result = -EINVAL;
+ break;
+ }
+
+ secure_ctxt = dev_priv->device->mmu.secured ? 1 : 0;
+
+ if (copy_to_user(param->value, &secure_ctxt,
+ sizeof(secure_ctxt)))
+ result = -EFAULT;
+
+ break;
+ }
default:
if (is_compat_task())
result = dev_priv->device->ftbl->getproperty_compat(
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
index b9b1e9c..9971fcd 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
@@ -2073,16 +2073,16 @@
coresight_simple_func(struct etmv4_drvdata, etmv4_cross_read, \
name, offset)
-coresight_etm4x_simple_func(trcpdcr, TRCPDCR);
-coresight_etm4x_simple_func(trcpdsr, TRCPDSR);
-coresight_etm4x_simple_func(trclsr, TRCLSR);
-coresight_etm4x_simple_func(trcauthstatus, TRCAUTHSTATUS);
-coresight_etm4x_simple_func(trcdevid, TRCDEVID);
-coresight_etm4x_simple_func(trcdevtype, TRCDEVTYPE);
-coresight_etm4x_simple_func(trcpidr0, TRCPIDR0);
-coresight_etm4x_simple_func(trcpidr1, TRCPIDR1);
-coresight_etm4x_simple_func(trcpidr2, TRCPIDR2);
-coresight_etm4x_simple_func(trcpidr3, TRCPIDR3);
+coresight_etm4x_cross_read(trcpdcr, TRCPDCR);
+coresight_etm4x_cross_read(trcpdsr, TRCPDSR);
+coresight_etm4x_cross_read(trclsr, TRCLSR);
+coresight_etm4x_cross_read(trcauthstatus, TRCAUTHSTATUS);
+coresight_etm4x_cross_read(trcdevid, TRCDEVID);
+coresight_etm4x_cross_read(trcdevtype, TRCDEVTYPE);
+coresight_etm4x_cross_read(trcpidr0, TRCPIDR0);
+coresight_etm4x_cross_read(trcpidr1, TRCPIDR1);
+coresight_etm4x_cross_read(trcpidr2, TRCPIDR2);
+coresight_etm4x_cross_read(trcpidr3, TRCPIDR3);
coresight_etm4x_cross_read(trcoslsr, TRCOSLSR);
coresight_etm4x_cross_read(trcconfig, TRCCONFIGR);
coresight_etm4x_cross_read(trctraceid, TRCTRACEIDR);
diff --git a/drivers/staging/android/ion/ion_carveout_heap.c b/drivers/staging/android/ion/ion_carveout_heap.c
index 492a93d..09bae03 100644
--- a/drivers/staging/android/ion/ion_carveout_heap.c
+++ b/drivers/staging/android/ion/ion_carveout_heap.c
@@ -160,7 +160,9 @@
.unmap_kernel = ion_heap_unmap_kernel,
};
-struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
+static struct ion_heap *__ion_carveout_heap_create(
+ struct ion_platform_heap *heap_data,
+ bool sync)
{
struct ion_carveout_heap *carveout_heap;
int ret;
@@ -172,7 +174,8 @@
page = pfn_to_page(PFN_DOWN(heap_data->base));
size = heap_data->size;
- ion_pages_sync_for_device(dev, page, size, DMA_BIDIRECTIONAL);
+ if (sync)
+ ion_pages_sync_for_device(dev, page, size, DMA_BIDIRECTIONAL);
ret = ion_heap_pages_zero(page, size, pgprot_writecombine(PAGE_KERNEL));
if (ret)
@@ -197,6 +200,11 @@
return &carveout_heap->heap;
}
+struct ion_heap *ion_carveout_heap_create(struct ion_platform_heap *heap_data)
+{
+ return __ion_carveout_heap_create(heap_data, true);
+}
+
void ion_carveout_heap_destroy(struct ion_heap *heap)
{
struct ion_carveout_heap *carveout_heap =
@@ -362,7 +370,7 @@
heap_data.size = size;
/* This will zero memory initially */
- entry->heap = ion_carveout_heap_create(&heap_data);
+ entry->heap = __ion_carveout_heap_create(&heap_data, false);
if (IS_ERR(entry->heap))
goto out_free;
diff --git a/drivers/usb/pd/policy_engine.c b/drivers/usb/pd/policy_engine.c
index 3165d1f..ff2484d 100644
--- a/drivers/usb/pd/policy_engine.c
+++ b/drivers/usb/pd/policy_engine.c
@@ -137,6 +137,14 @@
MSG_GET_COUNTRY_CODES,
};
+static const char * const usbpd_control_msg_strings[] = {
+ "", "GoodCRC", "GotoMin", "Accept", "Reject", "Ping", "PS_RDY",
+ "Get_Source_Cap", "Get_Sink_Cap", "DR_Swap", "PR_Swap", "VCONN_Swap",
+ "Wait", "Soft_Reset", "", "", "Not_Supported",
+ "Get_Source_Cap_Extended", "Get_Status", "FR_Swap", "Get_PPS_Status",
+ "Get_Country_Codes",
+};
+
enum usbpd_data_msg_type {
MSG_SOURCE_CAPABILITIES = 1,
MSG_REQUEST,
@@ -148,6 +156,12 @@
MSG_VDM = 0xF,
};
+static const char * const usbpd_data_msg_strings[] = {
+ "", "Source_Capabilities", "Request", "BIST", "Sink_Capabilities",
+ "Battery_Status", "Alert", "Get_Country_Info", "", "", "", "", "", "",
+ "", "Vendor_Defined",
+};
+
enum usbpd_ext_msg_type {
MSG_SOURCE_CAPABILITIES_EXTENDED = 1,
MSG_STATUS,
@@ -165,6 +179,29 @@
MSG_COUNTRY_CODES,
};
+static const char * const usbpd_ext_msg_strings[] = {
+ "", "Source_Capabilities_Extended", "Status", "Get_Battery_Cap",
+ "Get_Battery_Status", "Get_Manufacturer_Info", "Manufacturer_Info",
+ "Security_Request", "Security_Response", "Firmware_Update_Request",
+ "Firmware_Update_Response", "PPS_Status", "Country_Info",
+ "Country_Codes",
+};
+
+static inline const char *msg_to_string(u8 id, bool is_data, bool is_ext)
+{
+ if (is_ext) {
+ if (id < ARRAY_SIZE(usbpd_ext_msg_strings))
+ return usbpd_ext_msg_strings[id];
+ } else if (is_data) {
+ if (id < ARRAY_SIZE(usbpd_data_msg_strings))
+ return usbpd_data_msg_strings[id];
+ } else if (id < ARRAY_SIZE(usbpd_control_msg_strings)) {
+ return usbpd_control_msg_strings[id];
+ }
+
+ return "Invalid";
+}
+
enum vdm_state {
VDM_NONE,
DISCOVERED_ID,
@@ -641,8 +678,12 @@
pd->tx_msgid, num_data, pd->spec_rev);
ret = pd_phy_write(hdr, (u8 *)data, num_data * sizeof(u32), sop);
- if (ret)
+ if (ret) {
+ usbpd_err(&pd->dev, "Error sending %s: %d\n",
+ msg_to_string(msg_type, num_data, false),
+ ret);
return ret;
+ }
pd->tx_msgid = (pd->tx_msgid + 1) & PD_MAX_MSG_ID;
return 0;
@@ -682,8 +723,12 @@
PD_MSG_HDR_EXTENDED;
ret = pd_phy_write(hdr, chunked_payload,
num_objs * sizeof(u32), sop);
- if (ret)
+ if (ret) {
+ usbpd_err(&pd->dev, "Error sending %s: %d\n",
+ usbpd_ext_msg_strings[msg_type],
+ ret);
return ret;
+ }
pd->tx_msgid = (pd->tx_msgid + 1) & PD_MAX_MSG_ID;
@@ -998,6 +1043,7 @@
struct rx_msg *rx_msg;
unsigned long flags;
u16 header;
+ u8 msg_type, num_objs;
if (sop != SOP_MSG) {
usbpd_err(&pd->dev, "invalid msg type (%d) received; only SOP supported\n",
@@ -1043,8 +1089,12 @@
if (PD_MSG_HDR_REV(header) < pd->spec_rev)
pd->spec_rev = PD_MSG_HDR_REV(header);
- usbpd_dbg(&pd->dev, "received message: type(%d) num_objs(%d)\n",
- PD_MSG_HDR_TYPE(header), PD_MSG_HDR_COUNT(header));
+ msg_type = PD_MSG_HDR_TYPE(header);
+ num_objs = PD_MSG_HDR_COUNT(header);
+ usbpd_dbg(&pd->dev, "%s type(%d) num_objs(%d)\n",
+ msg_to_string(msg_type, num_objs,
+ PD_MSG_HDR_IS_EXTENDED(header)),
+ msg_type, num_objs);
if (!PD_MSG_HDR_IS_EXTENDED(header)) {
rx_msg = kzalloc(sizeof(*rx_msg) + len, GFP_ATOMIC);
@@ -1092,6 +1142,47 @@
return HRTIMER_NORESTART;
}
+static void log_decoded_request(struct usbpd *pd, u32 rdo)
+{
+ const u32 *pdos;
+ int pos = PD_RDO_OBJ_POS(rdo);
+ int type;
+
+ usbpd_dbg(&pd->dev, "RDO: 0x%08x\n", pd->rdo);
+
+ if (pd->current_pr == PR_SINK)
+ pdos = pd->received_pdos;
+ else
+ pdos = default_src_caps;
+
+ type = PD_SRC_PDO_TYPE(pdos[pos - 1]);
+
+ switch (type) {
+ case PD_SRC_PDO_TYPE_FIXED:
+ case PD_SRC_PDO_TYPE_VARIABLE:
+ usbpd_dbg(&pd->dev, "Request Fixed/Variable PDO:%d Volt:%dmV OpCurr:%dmA Curr:%dmA\n",
+ pos,
+ PD_SRC_PDO_FIXED_VOLTAGE(pdos[pos - 1]) * 50,
+ PD_RDO_FIXED_CURR(rdo) * 10,
+ PD_RDO_FIXED_CURR_MINMAX(rdo) * 10);
+ break;
+
+ case PD_SRC_PDO_TYPE_BATTERY:
+ usbpd_dbg(&pd->dev, "Request Battery PDO:%d OpPow:%dmW Pow:%dmW\n",
+ pos,
+ PD_RDO_FIXED_CURR(rdo) * 250,
+ PD_RDO_FIXED_CURR_MINMAX(rdo) * 250);
+ break;
+
+ case PD_SRC_PDO_TYPE_AUGMENTED:
+ usbpd_dbg(&pd->dev, "Request PPS PDO:%d Volt:%dmV Curr:%dmA\n",
+ pos,
+ PD_RDO_PROG_VOLTAGE(rdo) * 20,
+ PD_RDO_PROG_CURR(rdo) * 50);
+ break;
+ }
+}
+
/* Enters new state and executes actions on entry */
static void usbpd_set_state(struct usbpd *pd, enum usbpd_state next_state)
{
@@ -1200,6 +1291,8 @@
break;
case PE_SRC_NEGOTIATE_CAPABILITY:
+ log_decoded_request(pd, pd->rdo);
+
if (PD_RDO_OBJ_POS(pd->rdo) != 1 ||
PD_RDO_FIXED_CURR(pd->rdo) >
PD_SRC_PDO_FIXED_MAX_CURR(*default_src_caps) ||
@@ -1208,7 +1301,6 @@
/* send Reject */
ret = pd_send_msg(pd, MSG_REJECT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Reject\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -1230,7 +1322,6 @@
/* PE_SRC_TRANSITION_SUPPLY pseudo-state */
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -1246,7 +1337,6 @@
*/
ret = pd_send_msg(pd, MSG_PS_RDY, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending PS_RDY\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -1285,7 +1375,6 @@
ret = pd_send_msg(pd, MSG_SOFT_RESET, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Soft Reset, do Hard Reset\n");
usbpd_set_state(pd, pd->current_pr == PR_SRC ?
PE_SRC_HARD_RESET : PE_SNK_HARD_RESET);
break;
@@ -1384,9 +1473,10 @@
/* fall-through */
case PE_SNK_SELECT_CAPABILITY:
+ log_decoded_request(pd, pd->rdo);
+
ret = pd_send_msg(pd, MSG_REQUEST, &pd->rdo, 1, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Request\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -1892,7 +1982,6 @@
ret = pd_send_msg(pd, MSG_PS_RDY, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending PS_RDY\n");
usbpd_set_state(pd, pd->current_pr == PR_SRC ?
PE_SRC_SEND_SOFT_RESET :
PE_SNK_SEND_SOFT_RESET);
@@ -2212,10 +2301,8 @@
ret = pd_send_msg(pd, MSG_SINK_CAPABILITIES,
pd->sink_caps, pd->num_sink_caps,
SOP_MSG);
- if (ret) {
- usbpd_err(&pd->dev, "Error sending Sink Caps\n");
+ if (ret)
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
- }
} else if (IS_DATA(rx_msg, MSG_REQUEST)) {
pd->rdo = *(u32 *)rx_msg->payload;
usbpd_set_state(pd, PE_SRC_NEGOTIATE_CAPABILITY);
@@ -2227,7 +2314,6 @@
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -2240,7 +2326,6 @@
/* we'll happily accept Src->Sink requests anytime */
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -2251,7 +2336,6 @@
} else if (IS_CTRL(rx_msg, MSG_VCONN_SWAP)) {
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -2263,16 +2347,13 @@
/* unhandled messages */
ret = pd_send_msg(pd, MSG_NOT_SUPPORTED, NULL, 0,
SOP_MSG);
- if (ret) {
- usbpd_err(&pd->dev, "Error sending Not supported\n");
+ if (ret)
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
- }
break;
} else if (pd->send_pr_swap) {
pd->send_pr_swap = false;
ret = pd_send_msg(pd, MSG_PR_SWAP, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending PR Swap\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -2283,7 +2364,6 @@
pd->send_dr_swap = false;
ret = pd_send_msg(pd, MSG_DR_SWAP, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending DR Swap\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -2491,17 +2571,14 @@
ret = pd_send_msg(pd, MSG_SINK_CAPABILITIES,
pd->sink_caps, pd->num_sink_caps,
SOP_MSG);
- if (ret) {
- usbpd_err(&pd->dev, "Error sending Sink Caps\n");
+ if (ret)
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
- }
} else if (IS_CTRL(rx_msg, MSG_GET_SOURCE_CAP) &&
pd->spec_rev == USBPD_REV_20) {
ret = pd_send_msg(pd, MSG_SOURCE_CAPABILITIES,
default_src_caps,
ARRAY_SIZE(default_src_caps), SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending SRC CAPs\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2513,7 +2590,6 @@
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SRC_SEND_SOFT_RESET);
break;
}
@@ -2527,7 +2603,6 @@
/* TODO: should we Reject in certain circumstances? */
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2548,18 +2623,15 @@
(pd->requested_voltage > 5000000)) {
ret = pd_send_msg(pd, MSG_REJECT, NULL, 0,
SOP_MSG);
- if (ret) {
- usbpd_err(&pd->dev, "Error sending Reject\n");
+ if (ret)
usbpd_set_state(pd,
PE_SNK_SEND_SOFT_RESET);
- }
break;
}
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending Accept\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2572,7 +2644,6 @@
ret = pd_send_msg(pd, MSG_GET_SOURCE_CAP_EXTENDED, NULL,
0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending get_src_cap_ext\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2591,7 +2662,6 @@
ret = pd_send_msg(pd, MSG_GET_PPS_STATUS, NULL,
0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending get_pps_status\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2626,7 +2696,6 @@
pd->send_get_status = false;
ret = pd_send_msg(pd, MSG_GET_STATUS, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending get_status\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2644,7 +2713,6 @@
ret = pd_send_ext_msg(pd, MSG_GET_BATTERY_CAP,
&pd->get_battery_cap_db, 1, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending get_battery_cap\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2663,7 +2731,6 @@
ret = pd_send_ext_msg(pd, MSG_GET_BATTERY_STATUS,
&pd->get_battery_status_db, 1, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending get_battery_status\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2681,10 +2748,8 @@
/* unhandled messages */
ret = pd_send_msg(pd, MSG_NOT_SUPPORTED, NULL, 0,
SOP_MSG);
- if (ret) {
- usbpd_err(&pd->dev, "Error sending Not supported\n");
+ if (ret)
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
- }
break;
} else if (pd->send_request) {
pd->send_request = false;
@@ -2693,7 +2758,6 @@
pd->send_pr_swap = false;
ret = pd_send_msg(pd, MSG_PR_SWAP, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending PR Swap\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2704,7 +2768,6 @@
pd->send_dr_swap = false;
ret = pd_send_msg(pd, MSG_DR_SWAP, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending DR Swap\n");
usbpd_set_state(pd, PE_SNK_SEND_SOFT_RESET);
break;
}
@@ -2726,8 +2789,6 @@
ret = pd_send_msg(pd, MSG_ACCEPT, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "%s: Error sending Accept, do Hard Reset\n",
- usbpd_state_strings[pd->current_state]);
usbpd_set_state(pd, pd->current_pr == PR_SRC ?
PE_SRC_HARD_RESET : PE_SNK_HARD_RESET);
break;
@@ -2819,7 +2880,6 @@
ret = pd_send_msg(pd, MSG_PS_RDY, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending PS_RDY\n");
usbpd_set_state(pd, PE_ERROR_RECOVERY);
break;
}
@@ -2866,7 +2926,6 @@
ret = pd_send_msg(pd, MSG_PS_RDY, NULL, 0, SOP_MSG);
if (ret) {
- usbpd_err(&pd->dev, "Error sending PS_RDY\n");
usbpd_set_state(pd, PE_ERROR_RECOVERY);
break;
}
diff --git a/include/uapi/linux/msm_kgsl.h b/include/uapi/linux/msm_kgsl.h
index 943ba9e..8ffef59 100644
--- a/include/uapi/linux/msm_kgsl.h
+++ b/include/uapi/linux/msm_kgsl.h
@@ -332,6 +332,8 @@
#define KGSL_PROP_UBWC_MODE 0x1B
#define KGSL_PROP_DEVICE_QTIMER 0x20
#define KGSL_PROP_L3_PWR_CONSTRAINT 0x22
+#define KGSL_PROP_SECURE_BUFFER_ALIGNMENT 0x23
+#define KGSL_PROP_SECURE_CTXT_SUPPORT 0x24
struct kgsl_shadowprop {
unsigned long gpuaddr;