forked from Minki/linux
drm/i915: Make dp aux pack/unpack public outside intel_dp.c
No functional change. Just making it public for use outside intel_dp.c Allowing split psr functions. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
2fe486c7ea
commit
a4f1289eaa
@ -227,8 +227,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
|
|||||||
return MODE_OK;
|
return MODE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t
|
uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes)
|
||||||
pack_aux(const uint8_t *src, int src_bytes)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint32_t v = 0;
|
uint32_t v = 0;
|
||||||
@ -240,8 +239,7 @@ pack_aux(const uint8_t *src, int src_bytes)
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
|
||||||
unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
if (dst_bytes > 4)
|
if (dst_bytes > 4)
|
||||||
@ -863,7 +861,8 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
|
|||||||
/* Load the send data into the aux channel data registers */
|
/* Load the send data into the aux channel data registers */
|
||||||
for (i = 0; i < send_bytes; i += 4)
|
for (i = 0; i < send_bytes; i += 4)
|
||||||
I915_WRITE(ch_data + i,
|
I915_WRITE(ch_data + i,
|
||||||
pack_aux(send + i, send_bytes - i));
|
intel_dp_pack_aux(send + i,
|
||||||
|
send_bytes - i));
|
||||||
|
|
||||||
/* Send the command and wait for it to complete */
|
/* Send the command and wait for it to complete */
|
||||||
I915_WRITE(ch_ctl, send_ctl);
|
I915_WRITE(ch_ctl, send_ctl);
|
||||||
@ -917,7 +916,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
|
|||||||
recv_bytes = recv_size;
|
recv_bytes = recv_size;
|
||||||
|
|
||||||
for (i = 0; i < recv_bytes; i += 4)
|
for (i = 0; i < recv_bytes; i += 4)
|
||||||
unpack_aux(I915_READ(ch_data + i),
|
intel_dp_unpack_aux(I915_READ(ch_data + i),
|
||||||
recv + i, recv_bytes - i);
|
recv + i, recv_bytes - i);
|
||||||
|
|
||||||
ret = recv_bytes;
|
ret = recv_bytes;
|
||||||
@ -2159,7 +2158,7 @@ static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
|
|||||||
/* Setup AUX registers */
|
/* Setup AUX registers */
|
||||||
for (i = 0; i < sizeof(aux_msg); i += 4)
|
for (i = 0; i < sizeof(aux_msg); i += 4)
|
||||||
I915_WRITE(EDP_PSR_AUX_DATA1(dev) + i,
|
I915_WRITE(EDP_PSR_AUX_DATA1(dev) + i,
|
||||||
pack_aux(&aux_msg[i], sizeof(aux_msg) - i));
|
intel_dp_pack_aux(&aux_msg[i], sizeof(aux_msg) - i));
|
||||||
|
|
||||||
I915_WRITE(EDP_PSR_AUX_CTL(dev),
|
I915_WRITE(EDP_PSR_AUX_CTL(dev),
|
||||||
DP_AUX_CH_CTL_TIME_OUT_400us |
|
DP_AUX_CH_CTL_TIME_OUT_400us |
|
||||||
|
Loading…
Reference in New Issue
Block a user