Commit 63f7fcfe authored by Francisco Jerez's avatar Francisco Jerez Committed by Ben Skeggs

drm/nv04: Make CRTC base changes effective in the next hsync.

Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 382d62e5
...@@ -953,7 +953,7 @@ nv_load_state_ext(struct drm_device *dev, int head, ...@@ -953,7 +953,7 @@ nv_load_state_ext(struct drm_device *dev, int head,
NVWriteCRTC(dev, head, NV_PCRTC_850, regp->crtc_850); NVWriteCRTC(dev, head, NV_PCRTC_850, regp->crtc_850);
reg900 = NVReadRAMDAC(dev, head, NV_PRAMDAC_900); reg900 = NVReadRAMDAC(dev, head, NV_PRAMDAC_900);
if (regp->crtc_cfg == NV_PCRTC_CONFIG_START_ADDRESS_HSYNC) if (regp->crtc_cfg == NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC)
NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 | 0x10000); NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 | 0x10000);
else else
NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 & ~0x10000); NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 & ~0x10000);
......
...@@ -551,7 +551,10 @@ nv_crtc_mode_set_regs(struct drm_crtc *crtc, struct drm_display_mode * mode) ...@@ -551,7 +551,10 @@ nv_crtc_mode_set_regs(struct drm_crtc *crtc, struct drm_display_mode * mode)
if (dev_priv->card_type >= NV_30) if (dev_priv->card_type >= NV_30)
regp->gpio_ext = NVReadCRTC(dev, 0, NV_PCRTC_GPIO_EXT); regp->gpio_ext = NVReadCRTC(dev, 0, NV_PCRTC_GPIO_EXT);
regp->crtc_cfg = NV_PCRTC_CONFIG_START_ADDRESS_HSYNC; if (dev_priv->card_type >= NV_10)
regp->crtc_cfg = NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC;
else
regp->crtc_cfg = NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC;
/* Some misc regs */ /* Some misc regs */
if (dev_priv->card_type == NV_40) { if (dev_priv->card_type == NV_40) {
......
...@@ -153,7 +153,8 @@ ...@@ -153,7 +153,8 @@
#define NV_PCRTC_START 0x00600800 #define NV_PCRTC_START 0x00600800
#define NV_PCRTC_CONFIG 0x00600804 #define NV_PCRTC_CONFIG 0x00600804
# define NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA (1 << 0) # define NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA (1 << 0)
# define NV_PCRTC_CONFIG_START_ADDRESS_HSYNC (2 << 0) # define NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC (4 << 0)
# define NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC (2 << 0)
#define NV_PCRTC_CURSOR_CONFIG 0x00600810 #define NV_PCRTC_CURSOR_CONFIG 0x00600810
# define NV_PCRTC_CURSOR_CONFIG_ENABLE_ENABLE (1 << 0) # define NV_PCRTC_CURSOR_CONFIG_ENABLE_ENABLE (1 << 0)
# define NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE (1 << 4) # define NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE (1 << 4)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment