Message ID | 0101016ec6ddf2ce-8548e076-2347-49be-a9be-4d81a14ad8f7-000000@us-west-2.amazonses.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [DPU,v3,1/5] dt-bindings: msm/dp: add bindings of DP/DP-PLL driver for Snapdragon 845 | expand |
On Mon, 02 Dec 2019, Chandan Uddaraju <chandanu@codeaurora.org> wrote: > The constant N value (0x8000) is used by multiple DP > drivers. Define this value in header file and use this > in the existing i915 display driver. > > Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org> Reviewed-by: Jani Nikula <jani.nikula@intel.com> and ack for merging via drm-misc or whichever tree you find suitable. > --- > drivers/gpu/drm/i915/display/intel_display.c | 2 +- > include/drm/drm_dp_helper.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index ce05e80..1a4ccfd 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -7496,7 +7496,7 @@ static void compute_m_n(unsigned int m, unsigned int n, > * which the devices expect also in synchronous clock mode. > */ > if (constant_n) > - *ret_n = 0x8000; > + *ret_n = DP_LINK_CONSTANT_N_VALUE; > else > *ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX); > > diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h > index 8364502..69b8251 100644 > --- a/include/drm/drm_dp_helper.h > +++ b/include/drm/drm_dp_helper.h > @@ -1357,6 +1357,7 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux, > * DisplayPort link > */ > #define DP_LINK_CAP_ENHANCED_FRAMING (1 << 0) > +#define DP_LINK_CONSTANT_N_VALUE 0x8000 > > struct drm_dp_link { > unsigned char revision;
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index ce05e80..1a4ccfd 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7496,7 +7496,7 @@ static void compute_m_n(unsigned int m, unsigned int n, * which the devices expect also in synchronous clock mode. */ if (constant_n) - *ret_n = 0x8000; + *ret_n = DP_LINK_CONSTANT_N_VALUE; else *ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX); diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 8364502..69b8251 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1357,6 +1357,7 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux, * DisplayPort link */ #define DP_LINK_CAP_ENHANCED_FRAMING (1 << 0) +#define DP_LINK_CONSTANT_N_VALUE 0x8000 struct drm_dp_link { unsigned char revision;
The constant N value (0x8000) is used by multiple DP drivers. Define this value in header file and use this in the existing i915 display driver. Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org> --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- include/drm/drm_dp_helper.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)