mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
Merge branch 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
Multiple nouveau regression fixes, hdmi audio, s/r and dac load detection * 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nv50/kms: use dac loadval from vbios, where it's available drm/nv50/disp: force dac power state during load detect drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix drm/nv84/disp: Fix HDMI audio regression
This commit is contained in:
commit
0e32fde96b
@ -50,12 +50,16 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)
|
||||
{
|
||||
const u32 doff = (or * 0x800);
|
||||
int load = -EINVAL;
|
||||
nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80150000);
|
||||
nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000);
|
||||
nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
|
||||
mdelay(9);
|
||||
udelay(500);
|
||||
nv_wr32(priv, 0x61a00c + doff, 0x80000000);
|
||||
load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
|
||||
nv_wr32(priv, 0x61a00c + doff, 0x00000000);
|
||||
nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80550000);
|
||||
nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000);
|
||||
return load;
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,10 @@ nv84_hdmi_ctrl(struct nv50_disp_priv *priv, int head, int or, u32 data)
|
||||
nv_wr32(priv, 0x616510 + hoff, 0x00000000);
|
||||
nv_mask(priv, 0x616500 + hoff, 0x00000001, 0x00000001);
|
||||
|
||||
nv_mask(priv, 0x6165d0 + hoff, 0x00070001, 0x00010001); /* SPARE, HW_CTS */
|
||||
nv_mask(priv, 0x616568 + hoff, 0x00010101, 0x00000000); /* ACR_CTRL, ?? */
|
||||
nv_mask(priv, 0x616578 + hoff, 0x80000000, 0x80000000); /* ACR_0441_ENABLE */
|
||||
|
||||
/* ??? */
|
||||
nv_mask(priv, 0x61733c, 0x00100000, 0x00100000); /* RESETF */
|
||||
nv_mask(priv, 0x61733c, 0x10000000, 0x10000000); /* LOOKUP_EN */
|
||||
|
@ -40,14 +40,13 @@
|
||||
* FIFO channel objects
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
nv50_fifo_playlist_update(struct nv50_fifo_priv *priv)
|
||||
static void
|
||||
nv50_fifo_playlist_update_locked(struct nv50_fifo_priv *priv)
|
||||
{
|
||||
struct nouveau_bar *bar = nouveau_bar(priv);
|
||||
struct nouveau_gpuobj *cur;
|
||||
int i, p;
|
||||
|
||||
mutex_lock(&nv_subdev(priv)->mutex);
|
||||
cur = priv->playlist[priv->cur_playlist];
|
||||
priv->cur_playlist = !priv->cur_playlist;
|
||||
|
||||
@ -61,6 +60,13 @@ nv50_fifo_playlist_update(struct nv50_fifo_priv *priv)
|
||||
nv_wr32(priv, 0x0032f4, cur->addr >> 12);
|
||||
nv_wr32(priv, 0x0032ec, p);
|
||||
nv_wr32(priv, 0x002500, 0x00000101);
|
||||
}
|
||||
|
||||
void
|
||||
nv50_fifo_playlist_update(struct nv50_fifo_priv *priv)
|
||||
{
|
||||
mutex_lock(&nv_subdev(priv)->mutex);
|
||||
nv50_fifo_playlist_update_locked(priv);
|
||||
mutex_unlock(&nv_subdev(priv)->mutex);
|
||||
}
|
||||
|
||||
@ -489,7 +495,7 @@ nv50_fifo_init(struct nouveau_object *object)
|
||||
|
||||
for (i = 0; i < 128; i++)
|
||||
nv_wr32(priv, 0x002600 + (i * 4), 0x00000000);
|
||||
nv50_fifo_playlist_update(priv);
|
||||
nv50_fifo_playlist_update_locked(priv);
|
||||
|
||||
nv_wr32(priv, 0x003200, 0x00000001);
|
||||
nv_wr32(priv, 0x003250, 0x00000001);
|
||||
|
@ -218,7 +218,7 @@ struct nv04_display_class {
|
||||
#define NV50_DISP_DAC_PWR_STATE 0x00000040
|
||||
#define NV50_DISP_DAC_PWR_STATE_ON 0x00000000
|
||||
#define NV50_DISP_DAC_PWR_STATE_OFF 0x00000040
|
||||
#define NV50_DISP_DAC_LOAD 0x0002000c
|
||||
#define NV50_DISP_DAC_LOAD 0x00020100
|
||||
#define NV50_DISP_DAC_LOAD_VALUE 0x00000007
|
||||
|
||||
#define NV50_DISP_PIOR_MTHD 0x00030000
|
||||
|
@ -1554,7 +1554,9 @@ nv50_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)
|
||||
{
|
||||
struct nv50_disp *disp = nv50_disp(encoder->dev);
|
||||
int ret, or = nouveau_encoder(encoder)->or;
|
||||
u32 load = 0;
|
||||
u32 load = nouveau_drm(encoder->dev)->vbios.dactestval;
|
||||
if (load == 0)
|
||||
load = 340;
|
||||
|
||||
ret = nv_exec(disp->core, NV50_DISP_DAC_LOAD + or, &load, sizeof(load));
|
||||
if (ret || load != 7)
|
||||
|
Loading…
Reference in New Issue
Block a user