mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drm/tegra: Fix build for Linux v6.4
In Linux v6.4, the various drm_scdc_get/set functions were updated to take an argument of type 'struct drm_connector'. Add a new test to the conftest script that checks if this argument is used and use the definition created by conftest to select which version of the function is used. Bug 4221847 Change-Id: Id6b6396bbe875a0268f8fe2f68ae08f78a32c954 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989035 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5c6720246f
commit
d021a4fbae
@@ -2152,11 +2152,15 @@ static void tegra_sor_hdmi_disable_scrambling(struct tegra_sor *sor)
|
||||
|
||||
static void tegra_sor_hdmi_scdc_disable(struct tegra_sor *sor)
|
||||
{
|
||||
#if defined(NV_DRM_SCDC_GET_SET_HAS_STRUCT_DRM_CONNECTOR_ARG) /* Linux v6.4 */
|
||||
drm_scdc_set_high_tmds_clock_ratio(&sor->output.connector, false);
|
||||
drm_scdc_set_scrambling(&sor->output.connector, false);
|
||||
#else
|
||||
struct i2c_adapter *ddc = sor->output.ddc;
|
||||
|
||||
drm_scdc_set_high_tmds_clock_ratio(ddc, false);
|
||||
drm_scdc_set_scrambling(ddc, false);
|
||||
|
||||
#endif
|
||||
tegra_sor_hdmi_disable_scrambling(sor);
|
||||
}
|
||||
|
||||
@@ -2180,10 +2184,15 @@ static void tegra_sor_hdmi_enable_scrambling(struct tegra_sor *sor)
|
||||
|
||||
static void tegra_sor_hdmi_scdc_enable(struct tegra_sor *sor)
|
||||
{
|
||||
#if defined(NV_DRM_SCDC_GET_SET_HAS_STRUCT_DRM_CONNECTOR_ARG) /* Linux v6.4 */
|
||||
drm_scdc_set_high_tmds_clock_ratio(&sor->output.connector, true);
|
||||
drm_scdc_set_scrambling(&sor->output.connector, true);
|
||||
#else
|
||||
struct i2c_adapter *ddc = sor->output.ddc;
|
||||
|
||||
drm_scdc_set_high_tmds_clock_ratio(ddc, true);
|
||||
drm_scdc_set_scrambling(ddc, true);
|
||||
#endif
|
||||
|
||||
tegra_sor_hdmi_enable_scrambling(sor);
|
||||
}
|
||||
@@ -2191,9 +2200,14 @@ static void tegra_sor_hdmi_scdc_enable(struct tegra_sor *sor)
|
||||
static void tegra_sor_hdmi_scdc_work(struct work_struct *work)
|
||||
{
|
||||
struct tegra_sor *sor = container_of(work, struct tegra_sor, scdc.work);
|
||||
|
||||
#if defined(NV_DRM_SCDC_GET_SET_HAS_STRUCT_DRM_CONNECTOR_ARG) /* Linux v6.4 */
|
||||
if (!drm_scdc_get_scrambling_status(&sor->output.connector)) {
|
||||
#else
|
||||
struct i2c_adapter *ddc = sor->output.ddc;
|
||||
|
||||
if (!drm_scdc_get_scrambling_status(ddc)) {
|
||||
#endif
|
||||
DRM_DEBUG_KMS("SCDC not scrambled\n");
|
||||
tegra_sor_hdmi_scdc_enable(sor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user