|
@@ -1,5 +1,6 @@
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
/*
|
|
|
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
|
|
|
*/
|
|
|
|
|
@@ -606,7 +607,7 @@ static void sde_encoder_phys_vid_cont_splash_mode_set(
|
|
|
static void sde_encoder_phys_vid_mode_set(
|
|
|
struct sde_encoder_phys *phys_enc,
|
|
|
struct drm_display_mode *mode,
|
|
|
- struct drm_display_mode *adj_mode)
|
|
|
+ struct drm_display_mode *adj_mode, bool *reinit_mixers)
|
|
|
{
|
|
|
struct sde_rm *rm;
|
|
|
struct sde_rm_hw_iter iter;
|
|
@@ -632,8 +633,14 @@ static void sde_encoder_phys_vid_mode_set(
|
|
|
/* Retrieve previously allocated HW Resources. Shouldn't fail */
|
|
|
sde_rm_init_hw_iter(&iter, phys_enc->parent->base.id, SDE_HW_BLK_CTL);
|
|
|
for (i = 0; i <= instance; i++) {
|
|
|
- if (sde_rm_get_hw(rm, &iter))
|
|
|
+ if (sde_rm_get_hw(rm, &iter)) {
|
|
|
+ if (phys_enc->hw_ctl && phys_enc->hw_ctl != iter.hw) {
|
|
|
+ *reinit_mixers = true;
|
|
|
+ SDE_EVT32(phys_enc->hw_ctl->idx,
|
|
|
+ ((struct sde_hw_ctl *)iter.hw)->idx);
|
|
|
+ }
|
|
|
phys_enc->hw_ctl = (struct sde_hw_ctl *)iter.hw;
|
|
|
+ }
|
|
|
}
|
|
|
if (IS_ERR_OR_NULL(phys_enc->hw_ctl)) {
|
|
|
SDE_ERROR_VIDENC(vid_enc, "failed to init ctl, %ld\n",
|