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

Commit 2f39c721 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: count null character for blob length"

parents 615e9e46 22d1725e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3049,7 +3049,7 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
			catalog->perf.min_prefill_lines);

	msm_property_set_blob(&sde_crtc->property_info, &sde_crtc->blob_info,
			info->data, info->len, CRTC_PROP_INFO);
			info->data, SDE_KMS_INFO_DATALEN(info), CRTC_PROP_INFO);

	kfree(info);
}
+3 −1
Original line number Diff line number Diff line
@@ -313,10 +313,12 @@ struct sde_kms_info {

/**
 * SDE_KMS_INFO_DATALEN - Macro for accessing sde_kms_info data length
 *			it adds an extra character length to count null.
 * @S: Pointer to sde_kms_info structure
 * Returns: Size of available byte data
 */
#define SDE_KMS_INFO_DATALEN(S) ((S) ? ((struct sde_kms_info *)(S))->len : 0)
#define SDE_KMS_INFO_DATALEN(S) ((S) ? ((struct sde_kms_info *)(S))->len + 1 \
							: 0)

/**
 * sde_kms_info_reset - reset sde_kms_info structure
+4 −2
Original line number Diff line number Diff line
@@ -2409,7 +2409,8 @@ static void sde_plane_rot_install_caps(struct drm_plane *plane)
				rot_hw->ops.get_maxlinewidth(rot_hw));

	msm_property_set_blob(&psde->property_info, &psde->blob_rot_caps,
			info->data, info->len, PLANE_PROP_ROT_CAPS_V1);
			info->data, SDE_KMS_INFO_DATALEN(info),
			PLANE_PROP_ROT_CAPS_V1);

	sde_hw_rot_put(rot_hw);
error_rot:
@@ -3673,7 +3674,8 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
	sde_kms_info_add_keyint(info, "max_per_pipe_bw",
			psde->pipe_sblk->max_per_pipe_bw * 1000LL);
	msm_property_set_blob(&psde->property_info, &psde->blob_info,
			info->data, info->len, PLANE_PROP_INFO);
			info->data, SDE_KMS_INFO_DATALEN(info),
			PLANE_PROP_INFO);

	kfree(info);
	kfree(virt_format_list);