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

Commit d6141f84 authored by Narendra Muppalla's avatar Narendra Muppalla
Browse files

disp: msm: fix kw issues in sde driver



This change addresses out of range and null checks in
sde driver.

Change-Id: I905d795edf6715aa990dd7bbaf061734e95ddea6
Signed-off-by: default avatarNarendra Muppalla <NarendraM@codeaurora.org>
parent f97e75d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1009,7 +1009,7 @@ static void msm_lastclose(struct drm_device *dev)
		rc = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
		if (rc)
			DRM_ERROR("restore FBDEV mode failed: %d\n", rc);
	} else if (kms->client.dev) {
	} else if (kms && kms->client.dev) {
		rc = drm_client_modeset_commit_force(&kms->client);
		if (rc)
			DRM_ERROR("client modeset commit failed: %d\n", rc);
+1 −1
Original line number Diff line number Diff line
@@ -1364,7 +1364,7 @@ static int sde_cp_crtc_checkfeature(struct sde_cp_node *prop_node,
	bool feature_enabled = false;
	feature_wrapper check_feature = NULL;

	if (!prop_node || !sde_crtc || !sde_crtc_state) {
	if (!prop_node) {
		DRM_ERROR("invalid arguments");
		return -EINVAL;
	}
+2 −1
Original line number Diff line number Diff line
@@ -1246,7 +1246,7 @@ static void _sde_plane_setup_scaler(struct sde_plane *psde,
{
	struct sde_hw_pixel_ext *pe;
	uint32_t chroma_subsmpl_h, chroma_subsmpl_v;
	const struct drm_format_info *info = drm_format_info(fmt->base.pixel_format);
	const struct drm_format_info *info = NULL;

	if (!psde || !fmt || !pstate) {
		SDE_ERROR("invalid arg(s), plane %d fmt %d state %d\n",
@@ -1254,6 +1254,7 @@ static void _sde_plane_setup_scaler(struct sde_plane *psde,
		return;
	}

	info = drm_format_info(fmt->base.pixel_format);
	pe = &pstate->pixel_ext;

	psde->pipe_cfg.horz_decimation =
+1 −1
Original line number Diff line number Diff line
@@ -1808,7 +1808,7 @@ static int _sde_rm_get_hw_blk_for_cont_splash(struct sde_rm *rm,
	}

	while (_sde_rm_get_hw_locked(rm, &iter_dsc)) {
		if (!ctl->ops.read_active_status &&
		if (ctl->ops.read_active_status &&
				!(ctl->ops.read_active_status(ctl,
					SDE_HW_BLK_DSC,
					iter_dsc.blk->id)))