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

Commit 4c31e1ca authored by Christopher N. Hesse's avatar Christopher N. Hesse Committed by bonuzzz
Browse files

media: exynos: mfc: Do not change clocks if a DRM context is running

Turns out the previous patch did not handle all crash cases and we
need a more aggressive approach to this.

Change-Id: I855533212d407c7a9f67fc9add1185cd2cd580c0
(cherry picked from commit b79a6c3c4aa4ffcf06ba229ea4e89e37782d4328)
parent 929ba60a
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -464,15 +464,8 @@ int mfc_init_hw(struct s5p_mfc_dev *dev, enum mfc_buf_usage_type buf_type)
			s5p_mfc_clock_off(dev);
			dev->curr_ctx_drm = curr_ctx_backup;
			s5p_mfc_clock_on_with_base(dev, MFCBUF_NORMAL);
		} else if (buf_type == MFCBUF_NORMAL) {
			/* Must not change clocks if this is not the first instance */
			if (curr_ctx_backup > 0) {
		} else if (buf_type == MFCBUF_NORMAL && curr_ctx_backup) {
			s5p_mfc_init_memctrl(dev, MFCBUF_DRM);
			} else {
				s5p_mfc_clock_off(dev);
				dev->curr_ctx_drm = 1;
				s5p_mfc_clock_on_with_base(dev, MFCBUF_DRM);
			}
		}
	}
#endif