Skip to content

Commit ea9197c

Browse files
author
Ben Skeggs
committed
drm/nv50/disp: force dac power state during load detect
fdo#64904 Reported-by: Gerhard Bräunlich <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent 89e033a commit ea9197c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval)
5050
{
5151
const u32 doff = (or * 0x800);
5252
int load = -EINVAL;
53+
nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80150000);
54+
nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000);
5355
nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
5456
udelay(9500);
5557
nv_wr32(priv, 0x61a00c + doff, 0x80000000);
5658
load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
5759
nv_wr32(priv, 0x61a00c + doff, 0x00000000);
60+
nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80550000);
61+
nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000);
5862
return load;
5963
}
6064

drivers/gpu/drm/nouveau/core/include/core/class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ struct nv04_display_class {
218218
#define NV50_DISP_DAC_PWR_STATE 0x00000040
219219
#define NV50_DISP_DAC_PWR_STATE_ON 0x00000000
220220
#define NV50_DISP_DAC_PWR_STATE_OFF 0x00000040
221-
#define NV50_DISP_DAC_LOAD 0x0002000c
221+
#define NV50_DISP_DAC_LOAD 0x00020100
222222
#define NV50_DISP_DAC_LOAD_VALUE 0x00000007
223223

224224
#define NV50_DISP_PIOR_MTHD 0x00030000

0 commit comments

Comments
 (0)