[PATCH xf86-video-r128 3/4] Move R128InitDACRegisters to r128_output.c
Kevin Brace
kevinbrace at gmx.com
Sun Jun 17 17:39:32 UTC 2018
It does not make sense for this function to be inside r128_driver.c
since it is only called from a function inside r128_output.c.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
src/r128.h | 1 -
src/r128_driver.c | 13 -------------
src/r128_output.c | 13 +++++++++++++
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/r128.h b/src/r128.h
index 4043ec7..e666dfb 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -523,7 +523,6 @@ extern xf86OutputPtr R128FirstOutput(xf86CrtcPtr crtc);
extern void R128InitVideo(ScreenPtr pScreen);
extern void R128InitCommonRegisters(R128SavePtr save, R128InfoPtr info);
-extern void R128InitDACRegisters(R128SavePtr orig, R128SavePtr save, xf86OutputPtr output);
extern void R128InitRMXRegisters(R128SavePtr orig, R128SavePtr save, xf86OutputPtr output, DisplayModePtr mode);
extern void R128InitFPRegisters(R128SavePtr orig, R128SavePtr save, xf86OutputPtr output);
extern void R128InitLVDSRegisters(R128SavePtr orig, R128SavePtr save, xf86OutputPtr output);
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 591c5eb..3a20bbd 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -2700,19 +2700,6 @@ void R128InitCommonRegisters(R128SavePtr save, R128InfoPtr info)
save->bus_cntl |= R128_BUS_RD_DISCARD_EN | R128_BUS_RD_ABORT_EN;
}
-/* Define DAC registers for the requested video mode. */
-void R128InitDACRegisters(R128SavePtr orig, R128SavePtr save, xf86OutputPtr output)
-{
- ScrnInfoPtr pScrn = output->scrn;
- R128InfoPtr info = R128PTR(pScrn);
- xf86CrtcPtr crtc = output->crtc;
- R128CrtcPrivatePtr r128_crtc = crtc->driver_private;
-
- save->dac_cntl = (R128_DAC_MASK_ALL | R128_DAC_VGA_ADR_EN |
- (!r128_crtc->crtc_id ? 0 : R128_DAC_CRT_SEL_CRTC2) |
- (info->dac6bits ? 0 : R128_DAC_8BIT_EN));
-}
-
/* Define RMX registers for the requested video mode. */
void R128InitRMXRegisters(R128SavePtr orig, R128SavePtr save,
xf86OutputPtr output, DisplayModePtr mode)
diff --git a/src/r128_output.c b/src/r128_output.c
index 73b4af2..cfcd926 100644
--- a/src/r128_output.c
+++ b/src/r128_output.c
@@ -49,6 +49,19 @@
static void R128ConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output);
+/* Define DAC registers for the requested video mode. */
+void R128InitDACRegisters(R128SavePtr orig, R128SavePtr save, xf86OutputPtr output)
+{
+ ScrnInfoPtr pScrn = output->scrn;
+ R128InfoPtr info = R128PTR(pScrn);
+ xf86CrtcPtr crtc = output->crtc;
+ R128CrtcPrivatePtr r128_crtc = crtc->driver_private;
+
+ save->dac_cntl = (R128_DAC_MASK_ALL | R128_DAC_VGA_ADR_EN |
+ (!r128_crtc->crtc_id ? 0 : R128_DAC_CRT_SEL_CRTC2) |
+ (info->dac6bits ? 0 : R128_DAC_8BIT_EN));
+}
+
static void r128_dpms(xf86OutputPtr output, int mode)
{
switch(mode) {
--
2.7.4
More information about the xorg-driver-ati
mailing list