Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/dp: Return early if getting/acking device service IRQs fails

If getting/acking the device service IRQs fail, the short HPD handler
should bail out, falling back to a full connector detection as in case
of any AUX access failures during the HPD handling. Do this by
separating the getting/acking and handling steps of the IRQs.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-14-imre.deak@intel.com

Imre Deak 8a21e77c 81e4161d

+24 -13
+24 -13
drivers/gpu/drm/i915/display/intel_dp.c
··· 5789 5789 * Return %true if a full connector reprobe is required due to a failure while 5790 5790 * reading or acking the device service IRQs. 5791 5791 */ 5792 - static bool intel_dp_check_device_service_irq(struct intel_dp *intel_dp) 5792 + static bool intel_dp_get_and_ack_device_service_irq(struct intel_dp *intel_dp, u8 *irq_mask) 5793 5793 { 5794 - struct intel_display *display = to_intel_display(intel_dp); 5795 5794 u8 val; 5795 + 5796 + *irq_mask = 0; 5796 5797 5797 5798 if (drm_dp_dpcd_readb(&intel_dp->aux, 5798 5799 DP_DEVICE_SERVICE_IRQ_VECTOR, &val) != 1) 5799 - return true; 5800 - 5801 - if (!val) 5802 5800 return false; 5803 5801 5804 - if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_DEVICE_SERVICE_IRQ_VECTOR, val) != 1) 5802 + if (!val) 5805 5803 return true; 5806 5804 5807 - if (val & DP_AUTOMATED_TEST_REQUEST) 5805 + if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_DEVICE_SERVICE_IRQ_VECTOR, val) != 1) 5806 + return false; 5807 + 5808 + *irq_mask = val; 5809 + 5810 + return true; 5811 + } 5812 + 5813 + static void intel_dp_handle_device_service_irq(struct intel_dp *intel_dp, u8 irq_mask) 5814 + { 5815 + struct intel_display *display = to_intel_display(intel_dp); 5816 + 5817 + if (irq_mask & DP_AUTOMATED_TEST_REQUEST) 5808 5818 intel_dp_test_request(intel_dp); 5809 5819 5810 - if (val & DP_CP_IRQ) 5820 + if (irq_mask & DP_CP_IRQ) 5811 5821 intel_hdcp_handle_cp_irq(intel_dp->attached_connector); 5812 5822 5813 - if (val & DP_SINK_SPECIFIC_IRQ) 5823 + if (irq_mask & DP_SINK_SPECIFIC_IRQ) 5814 5824 drm_dbg_kms(display->drm, "Sink specific irq unhandled\n"); 5815 - 5816 - return false; 5817 5825 } 5818 5826 5819 5827 /* ··· 5880 5872 intel_dp_short_pulse(struct intel_dp *intel_dp) 5881 5873 { 5882 5874 bool reprobe_needed = false; 5875 + u8 irq_mask; 5883 5876 5884 5877 intel_dp_test_reset(intel_dp); 5885 5878 ··· 5895 5886 /* No need to proceed if we are going to do full detect */ 5896 5887 return false; 5897 5888 5898 - if (intel_dp_check_device_service_irq(intel_dp)) 5899 - reprobe_needed = true; 5889 + if (!intel_dp_get_and_ack_device_service_irq(intel_dp, &irq_mask)) 5890 + return false; 5891 + 5892 + intel_dp_handle_device_service_irq(intel_dp, irq_mask); 5900 5893 5901 5894 if (intel_dp_check_link_service_irq(intel_dp)) 5902 5895 reprobe_needed = true;