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

Commit d21960f4 authored by Alan Kwong's avatar Alan Kwong Committed by Narendra Muppalla
Browse files

drm/msm/sde: add resource management for writeback and cdm



Add resource management control for writeback and cdm hadware drivers.
This enables sharing of hardware resources among multiple controlling
components.

Change-Id: Ieac1058b4ccb6a59c934c3ad5053dae20ca8c4e5
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent dcc96ff8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -100,7 +100,8 @@ static int sde_crtc_reserve_hw_resources(struct drm_crtc *crtc,
		if (enc_hw_res.intfs[i]) {
			struct sde_crtc_mixer *mixer  =
				&sde_crtc->mixer[sde_crtc->num_mixers];
			plat_hw_res_map = sde_rm_get_res_map(sde_kms, i);
			plat_hw_res_map = sde_rm_get_res_map(sde_kms,
					i, SDE_NONE);

			lm_idx = plat_hw_res_map->lm;
			if (!lm_idx && unused_lm_count)
+1 −1
Original line number Diff line number Diff line
@@ -623,7 +623,7 @@ static int sde_encoder_setup_display(struct sde_encoder_virt *sde_enc,
			ret = -EINVAL;
		}

		hw_res_map = sde_rm_get_res_map(sde_kms, intf_idx);
		hw_res_map = sde_rm_get_res_map(sde_kms, intf_idx, SDE_NONE);
		if (IS_ERR_OR_NULL(hw_res_map)) {
			ret = -EINVAL;
		} else {
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ static void sde_encoder_phys_cmd_get_hw_resources(
	hw_res->intfs[cmd_enc->intf_idx] = INTF_MODE_CMD;
	hw_res->pingpongs[cmd_enc->hw_pp->idx] = true;
	hw_res_map = sde_rm_get_res_map(phys_enc->sde_kms,
			cmd_enc->intf_idx);
			cmd_enc->intf_idx, SDE_NONE);
	if (IS_ERR_OR_NULL(hw_res_map)) {
		DRM_ERROR("Failed to get hw_res_map: %ld", PTR_ERR(hw_res_map));
		return;
+1 −1
Original line number Diff line number Diff line
@@ -504,7 +504,7 @@ static void sde_encoder_phys_vid_get_hw_resources(
	 * otherwise signal/return failure
	 */
	hw_res_map = sde_rm_get_res_map(phys_enc->sde_kms,
			vid_enc->hw_intf->idx);
			vid_enc->hw_intf->idx, SDE_NONE);
	if (IS_ERR_OR_NULL(hw_res_map)) {
		DRM_ERROR("Failed to get hw_res_map: %ld", PTR_ERR(hw_res_map));
		return;
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ enum {
#define SDE_HW_BLK_INFO \
	u32 id; \
	u32 base; \
	unsigned long features; \
	unsigned long features

/**
 * MACRO SDE_HW_SUBBLK_INFO - information of HW sub-block inside SDE
Loading