Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 67bc2ae7f227a2afedc8e699cf0458fa7960f301
- Author: Julien Cristau <jcristau@debian.org>
- Date: Sun Oct 26 16:05:04 2008 +0100
- Bug#7148: Fix manpage formatting
- diff --git a/man/radeon.man b/man/radeon.man
- index 68029ed..e18c820 100644
- --- a/man/radeon.man
- +++ b/man/radeon.man
- @@ -516,7 +516,6 @@ This option allows you to disable int10 initialization. Set this to
- False if you are experiencing a hang when initializing a secondary card.
- The default is
- .B on.
- -.TP
- .SH SEE ALSO
- __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
- commit 98fdd78a1229584b922f816f331a45bfc178c961
- Author: Dave Airlie <airlied@linux.ie>
- Date: Tue Oct 21 18:36:22 2008 +1000
- atombios: oops typo
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index fb52d17..49de04f 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -332,7 +332,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- }
- if (radeon_output->type == OUTPUT_HDMI)
- disp_data2.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
- - disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- + disp_data2.usPixelClock = cpu_to_le16(mode->Clock / 10);
- disp_data2.ucTruncate = 0;
- disp_data2.ucSpatial = 0;
- disp_data2.ucTemporal = 0;
- commit 763dff6c117a10b6a57ba1854c5b798359789e44
- Author: Dave Airlie <airlied@linux.ie>
- Date: Tue Oct 21 18:35:44 2008 +1000
- atombios: set missing pixel clock
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index 24acbd7..fb52d17 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -332,6 +332,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- }
- if (radeon_output->type == OUTPUT_HDMI)
- disp_data2.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
- + disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- disp_data2.ucTruncate = 0;
- disp_data2.ucSpatial = 0;
- disp_data2.ucTemporal = 0;
- commit 435cf7da68186f2601c4b888296117d4f652c625
- Author: Alex Deucher <alexdeucher@gmail.com>
- Date: Wed Oct 15 10:52:14 2008 -0400
- Add LCD dithering quirk for macbook pro
- fixes bug 17897.
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index 148a1da..24acbd7 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -43,6 +43,8 @@
- #include "radeon_macros.h"
- #include "radeon_atombios.h"
- +#include "ati_pciids_gen.h"
- +
- static int
- atombios_output_dac1_setup(xf86OutputPtr output, DisplayModePtr mode)
- {
- @@ -894,6 +896,30 @@ atombios_set_output_crtc_source(xf86OutputPtr output)
- return;
- }
- +static void
- +atombios_apply_output_quirks(xf86OutputPtr output)
- +{
- + RADEONOutputPrivatePtr radeon_output = output->driver_private;
- + RADEONInfoPtr info = RADEONPTR(output->scrn);
- + unsigned char *RADEONMMIO = info->MMIO;
- +
- + /* Funky macbooks */
- + if ((info->Chipset == PCI_CHIP_RV530_71C5) &&
- + (PCI_SUB_VENDOR_ID(info->PciInfo) == 0x106b) &&
- + (PCI_SUB_DEVICE_ID(info->PciInfo) == 0x0080)) {
- + if (radeon_output->MonType == MT_LCD) {
- + if (radeon_output->devices & ATOM_DEVICE_LCD1_SUPPORT) {
- + uint32_t lvtma_bit_depth_control = INREG(AVIVO_LVTMA_BIT_DEPTH_CONTROL);
- +
- + lvtma_bit_depth_control &= ~AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN;
- + lvtma_bit_depth_control &= ~AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN;
- +
- + OUTREG(AVIVO_LVTMA_BIT_DEPTH_CONTROL, lvtma_bit_depth_control);
- + }
- + }
- + }
- +}
- +
- void
- atombios_output_mode_set(xf86OutputPtr output,
- DisplayModePtr mode,
- @@ -955,7 +981,7 @@ atombios_output_mode_set(xf86OutputPtr output,
- atombios_output_dac2_setup(output, adjusted_mode);
- atombios_output_tv1_setup(output, adjusted_mode);
- }
- -
- + atombios_apply_output_quirks(output);
- }
- static AtomBiosResult
- commit c0e6cb6d0eeef8f2ea60d840e1cd668fa92cd7f9
- Author: Alex Deucher <alexdeucher@gmail.com>
- Date: Fri Oct 10 11:09:27 2008 -0400
- Fix grey level dithering setup
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index a770177..148a1da 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -346,7 +346,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- disp_data2.ucTemporal = PANEL_ENCODER_TEMPORAL_DITHER_EN;
- if (radeon_output->lvds_misc & (1 << 1))
- disp_data2.ucTemporal |= PANEL_ENCODER_TEMPORAL_DITHER_DEPTH;
- - if (((radeon_output->lvds_misc >> 2) & 0x3) == 4)
- + if (((radeon_output->lvds_misc >> 2) & 0x3) == 2)
- disp_data2.ucTemporal |= PANEL_ENCODER_TEMPORAL_LEVEL_4;
- }
- } else {
- commit 9eb2b6cd28224f0cbbabf3df451696ae1a845b9c
- Author: Dave Airlie <airlied@redhat.com>
- Date: Fri Oct 10 16:18:05 2008 +1000
- radeon: hopefully fix plls for 30" monitors.
- Only do the HIGH trick on the DCE3 cards. Tested on rv610/630/770.
- diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
- index 3f2e113..4e2395f 100644
- --- a/src/atombios_crtc.c
- +++ b/src/atombios_crtc.c
- @@ -224,7 +224,7 @@ atombios_crtc_set_pll(xf86CrtcPtr crtc, DisplayModePtr mode, int pll_flags)
- if (IS_AVIVO_VARIANT) {
- uint32_t temp;
- - if (mode->Clock > 200000) /* range limits??? */
- + if (IS_DCE3_VARIANT && mode->Clock > 200000) /* range limits??? */
- pll_flags |= RADEON_PLL_PREFER_HIGH_FB_DIV;
- else
- pll_flags |= RADEON_PLL_PREFER_LOW_REF_DIV;
- commit 0975e007ec7933acf9cd8ad2f281313ef8d32ac9
- Author: Dave Airlie <airlied@redhat.com>
- Date: Thu Oct 9 17:16:28 2008 +1100
- radeon: rename radeon_memory to radeon_legacy_memory.
- This is a setup patch for the kms/memory management code.
- diff --git a/src/Makefile.am b/src/Makefile.am
- index c79b635..d65a3e4 100644
- --- a/src/Makefile.am
- +++ b/src/Makefile.am
- @@ -88,7 +88,7 @@ radeon_drv_la_LTLIBRARIES = radeon_drv.la
- radeon_drv_la_LDFLAGS = -module -avoid-version
- radeon_drv_ladir = @moduledir@/drivers
- radeon_drv_la_SOURCES = \
- - radeon_accel.c radeon_cursor.c radeon_dga.c radeon_memory.c \
- + radeon_accel.c radeon_cursor.c radeon_dga.c radeon_legacy_memory.c \
- radeon_driver.c radeon_video.c radeon_bios.c radeon_mm_i2c.c \
- radeon_vip.c radeon_misc.c radeon_probe.c \
- legacy_crtc.c legacy_output.c \
- diff --git a/src/radeon.h b/src/radeon.h
- index aec8a25..f7ae1a8 100644
- --- a/src/radeon.h
- +++ b/src/radeon.h
- @@ -1068,15 +1068,15 @@ extern void RADEONUpdateHVPosition(xf86OutputPtr output, DisplayModePtr mode);
- extern void RADEONInitVideo(ScreenPtr pScreen);
- extern void RADEONResetVideo(ScrnInfoPtr pScrn);
- -/* radeon_memory.c */
- +/* radeon_legacy_memory.c */
- extern uint32_t
- -radeon_allocate_memory(ScrnInfoPtr pScrn,
- - void **mem_struct,
- - int size,
- - int align);
- +radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
- + void **mem_struct,
- + int size,
- + int align);
- extern void
- -radeon_free_memory(ScrnInfoPtr pScrn,
- - void *mem_struct);
- +radeon_legacy_free_memory(ScrnInfoPtr pScrn,
- + void *mem_struct);
- #ifdef XF86DRI
- # ifdef USE_XAA
- diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
- index 99992fc..9040bae 100644
- --- a/src/radeon_crtc.c
- +++ b/src/radeon_crtc.c
- @@ -418,7 +418,7 @@ radeon_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
- * setter for offscreen area locking in EXA currently. So, we just
- * allocate offscreen memory and fake up a pixmap header for it.
- */
- - rotate_offset = radeon_allocate_memory(pScrn, &radeon_crtc->crtc_rotate_mem, size, align);
- + rotate_offset = radeon_legacy_allocate_memory(pScrn, &radeon_crtc->crtc_rotate_mem, size, align);
- if (rotate_offset == 0)
- return NULL;
- @@ -466,7 +466,7 @@ radeon_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data
- FreeScratchPixmapHeader(rotate_pixmap);
- if (data) {
- - radeon_free_memory(pScrn, radeon_crtc->crtc_rotate_mem);
- + radeon_legacy_free_memory(pScrn, radeon_crtc->crtc_rotate_mem);
- radeon_crtc->crtc_rotate_mem = NULL;
- }
- diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
- index 22a33d6..08bfddf 100644
- --- a/src/radeon_cursor.c
- +++ b/src/radeon_cursor.c
- @@ -341,7 +341,7 @@ Bool RADEONCursorInit(ScreenPtr pScreen)
- RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
- radeon_crtc->cursor_offset =
- - radeon_allocate_memory(pScrn, &radeon_crtc->cursor_mem, size_bytes, align);
- + radeon_legacy_allocate_memory(pScrn, &radeon_crtc->cursor_mem, size_bytes, align);
- if (radeon_crtc->cursor_offset == 0)
- return FALSE;
- diff --git a/src/radeon_legacy_memory.c b/src/radeon_legacy_memory.c
- new file mode 100644
- index 0000000..2a9ee94
- --- /dev/null
- +++ b/src/radeon_legacy_memory.c
- @@ -0,0 +1,117 @@
- +
- +#ifdef HAVE_CONFIG_H
- +#include "config.h"
- +#endif
- +
- +/* Driver data structures */
- +#include "radeon.h"
- +
- +/* Allocates memory, either by resizing the allocation pointed to by mem_struct,
- + * or by freeing mem_struct (if non-NULL) and allocating a new space. The size
- + * is measured in bytes, and the offset from the beginning of card space is
- + * returned.
- + */
- +uint32_t
- +radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
- + void **mem_struct,
- + int size,
- + int align)
- +{
- + ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- + RADEONInfoPtr info = RADEONPTR(pScrn);
- + uint32_t offset = 0;
- +
- +#ifdef USE_EXA
- + if (info->useEXA) {
- + ExaOffscreenArea *area = *mem_struct;
- +
- + if (area != NULL) {
- + if (area->size >= size)
- + return area->offset;
- +
- + exaOffscreenFree(pScreen, area);
- + }
- +
- + area = exaOffscreenAlloc(pScreen, size, align, TRUE,
- + NULL, NULL);
- +
- + *mem_struct = area;
- + if (area == NULL)
- + return 0;
- + offset = area->offset;
- + }
- +#endif /* USE_EXA */
- +#ifdef USE_XAA
- + if (!info->useEXA) {
- + FBLinearPtr linear = *mem_struct;
- + int cpp = info->CurrentLayout.bitsPerPixel / 8;
- +
- + /* XAA allocates in units of pixels at the screen bpp, so adjust size
- + * appropriately.
- + */
- + size = (size + cpp - 1) / cpp;
- + align = (align + cpp - 1) / cpp;
- +
- + if (linear) {
- + if(linear->size >= size)
- + return linear->offset * cpp;
- +
- + if(xf86ResizeOffscreenLinear(linear, size))
- + return linear->offset * cpp;
- +
- + xf86FreeOffscreenLinear(linear);
- + }
- +
- + linear = xf86AllocateOffscreenLinear(pScreen, size, align,
- + NULL, NULL, NULL);
- + *mem_struct = linear;
- +
- + if (!linear) {
- + int max_size;
- +
- + xf86QueryLargestOffscreenLinear(pScreen, &max_size, align,
- + PRIORITY_EXTREME);
- +
- + if (max_size < size)
- + return 0;
- +
- + xf86PurgeUnlockedOffscreenAreas(pScreen);
- + linear = xf86AllocateOffscreenLinear(pScreen, size, align,
- + NULL, NULL, NULL);
- + *mem_struct = linear;
- + if (!linear)
- + return 0;
- + }
- + offset = linear->offset * cpp;
- + }
- +#endif /* USE_XAA */
- +
- + return offset;
- +}
- +
- +void
- +radeon_legacy_free_memory(ScrnInfoPtr pScrn,
- + void *mem_struct)
- +{
- + ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- + RADEONInfoPtr info = RADEONPTR(pScrn);
- +
- +#ifdef USE_EXA
- + if (info->useEXA) {
- + ExaOffscreenArea *area = mem_struct;
- +
- + if (area != NULL)
- + exaOffscreenFree(pScreen, area);
- + area = NULL;
- + }
- +#endif /* USE_EXA */
- +#ifdef USE_XAA
- + if (!info->useEXA) {
- + FBLinearPtr linear = mem_struct;
- +
- + if (linear != NULL)
- + xf86FreeOffscreenLinear(linear);
- + linear = NULL;
- + }
- +#endif /* USE_XAA */
- +}
- diff --git a/src/radeon_memory.c b/src/radeon_memory.c
- deleted file mode 100644
- index f965cb4..0000000
- --- a/src/radeon_memory.c
- +++ /dev/null
- @@ -1,117 +0,0 @@
- -
- -#ifdef HAVE_CONFIG_H
- -#include "config.h"
- -#endif
- -
- -/* Driver data structures */
- -#include "radeon.h"
- -
- -/* Allocates memory, either by resizing the allocation pointed to by mem_struct,
- - * or by freeing mem_struct (if non-NULL) and allocating a new space. The size
- - * is measured in bytes, and the offset from the beginning of card space is
- - * returned.
- - */
- -uint32_t
- -radeon_allocate_memory(ScrnInfoPtr pScrn,
- - void **mem_struct,
- - int size,
- - int align)
- -{
- - ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- - RADEONInfoPtr info = RADEONPTR(pScrn);
- - uint32_t offset = 0;
- -
- -#ifdef USE_EXA
- - if (info->useEXA) {
- - ExaOffscreenArea *area = *mem_struct;
- -
- - if (area != NULL) {
- - if (area->size >= size)
- - return area->offset;
- -
- - exaOffscreenFree(pScreen, area);
- - }
- -
- - area = exaOffscreenAlloc(pScreen, size, align, TRUE,
- - NULL, NULL);
- -
- - *mem_struct = area;
- - if (area == NULL)
- - return 0;
- - offset = area->offset;
- - }
- -#endif /* USE_EXA */
- -#ifdef USE_XAA
- - if (!info->useEXA) {
- - FBLinearPtr linear = *mem_struct;
- - int cpp = info->CurrentLayout.bitsPerPixel / 8;
- -
- - /* XAA allocates in units of pixels at the screen bpp, so adjust size
- - * appropriately.
- - */
- - size = (size + cpp - 1) / cpp;
- - align = (align + cpp - 1) / cpp;
- -
- - if (linear) {
- - if(linear->size >= size)
- - return linear->offset * cpp;
- -
- - if(xf86ResizeOffscreenLinear(linear, size))
- - return linear->offset * cpp;
- -
- - xf86FreeOffscreenLinear(linear);
- - }
- -
- - linear = xf86AllocateOffscreenLinear(pScreen, size, align,
- - NULL, NULL, NULL);
- - *mem_struct = linear;
- -
- - if (!linear) {
- - int max_size;
- -
- - xf86QueryLargestOffscreenLinear(pScreen, &max_size, align,
- - PRIORITY_EXTREME);
- -
- - if (max_size < size)
- - return 0;
- -
- - xf86PurgeUnlockedOffscreenAreas(pScreen);
- - linear = xf86AllocateOffscreenLinear(pScreen, size, align,
- - NULL, NULL, NULL);
- - *mem_struct = linear;
- - if (!linear)
- - return 0;
- - }
- - offset = linear->offset * cpp;
- - }
- -#endif /* USE_XAA */
- -
- - return offset;
- -}
- -
- -void
- -radeon_free_memory(ScrnInfoPtr pScrn,
- - void *mem_struct)
- -{
- - ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- - RADEONInfoPtr info = RADEONPTR(pScrn);
- -
- -#ifdef USE_EXA
- - if (info->useEXA) {
- - ExaOffscreenArea *area = mem_struct;
- -
- - if (area != NULL)
- - exaOffscreenFree(pScreen, area);
- - area = NULL;
- - }
- -#endif /* USE_EXA */
- -#ifdef USE_XAA
- - if (!info->useEXA) {
- - FBLinearPtr linear = mem_struct;
- -
- - if (linear != NULL)
- - xf86FreeOffscreenLinear(linear);
- - linear = NULL;
- - }
- -#endif /* USE_XAA */
- -}
- diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
- index 4005df9..c185b46 100644
- --- a/src/radeon_textured_video.c
- +++ b/src/radeon_textured_video.c
- @@ -197,14 +197,14 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
- dstPitch = (dstPitch + 15) & ~15;
- if (pPriv->video_memory != NULL && size != pPriv->size) {
- - radeon_free_memory(pScrn, pPriv->video_memory);
- + radeon_legacy_free_memory(pScrn, pPriv->video_memory);
- pPriv->video_memory = NULL;
- }
- if (pPriv->video_memory == NULL) {
- - pPriv->video_offset = radeon_allocate_memory(pScrn,
- - &pPriv->video_memory,
- - size * 2, 64);
- + pPriv->video_offset = radeon_legacy_allocate_memory(pScrn,
- + &pPriv->video_memory,
- + size * 2, 64);
- if (pPriv->video_offset == 0)
- return BadAlloc;
- }
- @@ -213,9 +213,9 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
- if (!IS_R500_3D)
- pPriv->bicubic_enabled = FALSE;
- if (pPriv->bicubic_memory == NULL && pPriv->bicubic_enabled) {
- - pPriv->bicubic_offset = radeon_allocate_memory(pScrn,
- - &pPriv->bicubic_memory,
- - sizeof(bicubic_tex_512), 64);
- + pPriv->bicubic_offset = radeon_legacy_allocate_memory(pScrn,
- + &pPriv->bicubic_memory,
- + sizeof(bicubic_tex_512), 64);
- pPriv->bicubic_src_offset = pPriv->bicubic_offset + info->fbLocation + pScrn->fbOffset;
- if (pPriv->bicubic_offset == 0)
- pPriv->bicubic_enabled = FALSE;
- diff --git a/src/radeon_video.c b/src/radeon_video.c
- index 47b0497..6249cea 100644
- --- a/src/radeon_video.c
- +++ b/src/radeon_video.c
- @@ -1638,11 +1638,11 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
- if (pPriv->textured) {
- if (cleanup) {
- if (pPriv->bicubic_memory != NULL) {
- - radeon_free_memory(pScrn, pPriv->bicubic_memory);
- + radeon_legacy_free_memory(pScrn, pPriv->bicubic_memory);
- pPriv->bicubic_memory = NULL;
- }
- if (pPriv->video_memory != NULL) {
- - radeon_free_memory(pScrn, pPriv->video_memory);
- + radeon_legacy_free_memory(pScrn, pPriv->video_memory);
- pPriv->video_memory = NULL;
- }
- }
- @@ -1667,7 +1667,7 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
- if(pPriv->i2c != NULL) RADEON_board_setmisc(pPriv);
- }
- if (pPriv->video_memory != NULL) {
- - radeon_free_memory(pScrn, pPriv->video_memory);
- + radeon_legacy_free_memory(pScrn, pPriv->video_memory);
- pPriv->video_memory = NULL;
- }
- pPriv->videoStatus = 0;
- @@ -2937,9 +2937,9 @@ RADEONPutImage(
- if (idconv == FOURCC_YV12 || id == FOURCC_I420) {
- new_size += (dstPitch >> 1) * ((height + 1) & ~1);
- }
- - pPriv->video_offset = radeon_allocate_memory(pScrn, &pPriv->video_memory,
- - (pPriv->doubleBuffer ?
- - (new_size * 2) : new_size), 64);
- + pPriv->video_offset = radeon_legacy_allocate_memory(pScrn, &pPriv->video_memory,
- + (pPriv->doubleBuffer ?
- + (new_size * 2) : new_size), 64);
- if (pPriv->video_offset == 0)
- return BadAlloc;
- @@ -3133,7 +3133,7 @@ RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time now)
- } else { /* FREE_TIMER */
- if(pPriv->freeTime < now) {
- if (pPriv->video_memory != NULL) {
- - radeon_free_memory(pScrn, pPriv->video_memory);
- + radeon_legacy_free_memory(pScrn, pPriv->video_memory);
- pPriv->video_memory = NULL;
- }
- pPriv->videoStatus = 0;
- @@ -3168,7 +3168,7 @@ RADEONAllocateSurface(
- pitch = ((w << 1) + 15) & ~15;
- size = pitch * h;
- - offset = radeon_allocate_memory(pScrn, &surface_memory, size, 64);
- + offset = radeon_legacy_allocate_memory(pScrn, &surface_memory, size, 64);
- if (offset == 0)
- return BadAlloc;
- @@ -3176,18 +3176,18 @@ RADEONAllocateSurface(
- surface->height = h;
- if(!(surface->pitches = xalloc(sizeof(int)))) {
- - radeon_free_memory(pScrn, surface_memory);
- + radeon_legacy_free_memory(pScrn, surface_memory);
- return BadAlloc;
- }
- if(!(surface->offsets = xalloc(sizeof(int)))) {
- xfree(surface->pitches);
- - radeon_free_memory(pScrn, surface_memory);
- + radeon_legacy_free_memory(pScrn, surface_memory);
- return BadAlloc;
- }
- if(!(pPriv = xalloc(sizeof(OffscreenPrivRec)))) {
- xfree(surface->pitches);
- xfree(surface->offsets);
- - radeon_free_memory(pScrn, surface_memory);
- + radeon_legacy_free_memory(pScrn, surface_memory);
- return BadAlloc;
- }
- @@ -3228,7 +3228,7 @@ RADEONFreeSurface(
- if(pPriv->isOn)
- RADEONStopSurface(surface);
- - radeon_free_memory(pScrn, pPriv->surface_memory);
- + radeon_legacy_free_memory(pScrn, pPriv->surface_memory);
- pPriv->surface_memory = NULL;
- xfree(surface->pitches);
- xfree(surface->offsets);
- @@ -3504,9 +3504,9 @@ RADEONPutVideo(
- if (pPriv->capture_vbi_data)
- alloc_size += 2 * 2 * vbi_line_width * 21;
- - pPriv->video_offset = radeon_allocate_memory(pScrn, &pPriv->video_memory,
- - (pPriv->doubleBuffer ?
- - (new_size * 2) : new_size), 64);
- + pPriv->video_offset = radeon_legacy_allocate_memory(pScrn, &pPriv->video_memory,
- + (pPriv->doubleBuffer ?
- + (new_size * 2) : new_size), 64);
- if (pPriv->video_offset == 0)
- return BadAlloc;
- commit d744dc013cf5ca3141c0fdf55e36d713fe9f53ba
- Author: Adam Jackson <ajax@redhat.com>
- Date: Wed Oct 8 15:50:25 2008 -0400
- Fix connector table mapping for lvtma/kaleidoscope/uniphy.
- Fixes DPMS on LVDS.
- diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
- index 13eb1fc..851014b 100644
- --- a/src/radeon_atombios.c
- +++ b/src/radeon_atombios.c
- @@ -1594,15 +1594,23 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
- break;
- case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
- - info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP1_INDEX);
- - info->BiosConnector[i].TMDSType = TMDS_INT;
- + if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_LCD1_INDEX);
- + else {
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP1_INDEX);
- + info->BiosConnector[i].TMDSType = TMDS_INT;
- + }
- break;
- case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
- - if (num == 1)
- - info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP1_INDEX);
- - else
- - info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP2_INDEX);
- - info->BiosConnector[i].TMDSType = TMDS_UNIPHY;
- + if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_LCD1_INDEX);
- + else {
- + if (num == 1)
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP1_INDEX);
- + else
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP2_INDEX);
- + info->BiosConnector[i].TMDSType = TMDS_UNIPHY;
- + }
- break;
- case ENCODER_OBJECT_ID_INTERNAL_TMDS2:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
- @@ -1611,8 +1619,12 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
- break;
- case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
- - info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP3_INDEX);
- - info->BiosConnector[i].TMDSType = TMDS_LVTMA;
- + if (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_LCD1_INDEX);
- + else {
- + info->BiosConnector[i].devices |= (1 << ATOM_DEVICE_DFP3_INDEX);
- + info->BiosConnector[i].TMDSType = TMDS_LVTMA;
- + }
- break;
- case ENCODER_OBJECT_ID_INTERNAL_DAC1:
- case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
- commit dc795ba66a8c0eb2c3fdb86bd42dfc17e0aa3b6e
- Author: Alex Deucher <alexdeucher@gmail.com>
- Date: Tue Oct 7 12:32:47 2008 -0400
- Fixups from last DFP/LCD refactor
- - fix DFP1 -> LCD1
- - use _INDEX rather than _SUPPORT defs
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index fad5a10..a770177 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -278,13 +278,13 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- int major, minor;
- switch (device) {
- - case ATOM_DEVICE_DFP1_SUPPORT:
- + case ATOM_DEVICE_DFP1_INDEX:
- index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
- break;
- - case ATOM_DEVICE_LCD1_SUPPORT:
- + case ATOM_DEVICE_LCD1_INDEX:
- index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
- break;
- - case ATOM_DEVICE_DFP3_SUPPORT:
- + case ATOM_DEVICE_DFP3_INDEX:
- index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
- break;
- default:
- @@ -305,7 +305,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- if (radeon_output->type == OUTPUT_HDMI)
- disp_data.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
- disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- - if (device == ATOM_DEVICE_DFP1_SUPPORT) {
- + if (device == ATOM_DEVICE_LCD1_INDEX) {
- if (radeon_output->lvds_misc & (1 << 0))
- disp_data.ucMisc |= PANEL_ENCODER_MISC_DUAL;
- if (radeon_output->lvds_misc & (1 << 1))
- @@ -334,7 +334,7 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- disp_data2.ucSpatial = 0;
- disp_data2.ucTemporal = 0;
- disp_data2.ucFRC = 0;
- - if (device == ATOM_DEVICE_DFP1_SUPPORT) {
- + if (device == ATOM_DEVICE_LCD1_INDEX) {
- if (radeon_output->lvds_misc & (1 << 0))
- disp_data2.ucMisc |= PANEL_ENCODER_MISC_DUAL;
- if (radeon_output->lvds_misc & (1 << 5)) {
- @@ -919,7 +919,7 @@ atombios_output_mode_set(xf86OutputPtr output,
- atombios_output_dig1_setup(output, adjusted_mode);
- atombios_output_dig1_transmitter_setup(output, adjusted_mode);
- } else
- - atombios_output_digital_setup(output, ATOM_DEVICE_DFP1_SUPPORT, adjusted_mode);
- + atombios_output_digital_setup(output, ATOM_DEVICE_DFP1_INDEX, adjusted_mode);
- } else if (radeon_output->devices & ATOM_DEVICE_DFP2_SUPPORT) {
- if (IS_DCE3_VARIANT) {
- // fix me
- @@ -936,7 +936,7 @@ atombios_output_mode_set(xf86OutputPtr output,
- atombios_output_dig2_setup(output, adjusted_mode);
- atombios_output_dig2_transmitter_setup(output, adjusted_mode);
- } else
- - atombios_output_digital_setup(output, ATOM_DEVICE_DFP3_SUPPORT, adjusted_mode);
- + atombios_output_digital_setup(output, ATOM_DEVICE_DFP3_INDEX, adjusted_mode);
- }
- } else if (radeon_output->MonType == MT_LCD) {
- if (radeon_output->devices & ATOM_DEVICE_LCD1_SUPPORT) {
- @@ -944,7 +944,7 @@ atombios_output_mode_set(xf86OutputPtr output,
- atombios_output_dig2_setup(output, adjusted_mode);
- atombios_output_dig2_transmitter_setup(output, adjusted_mode);
- } else
- - atombios_output_digital_setup(output, ATOM_DEVICE_LCD1_SUPPORT, adjusted_mode);
- + atombios_output_digital_setup(output, ATOM_DEVICE_LCD1_INDEX, adjusted_mode);
- }
- } else if ((radeon_output->MonType == MT_CTV) ||
- (radeon_output->MonType == MT_STV) ||
- commit 4a9e8d9fe24278b56aef51677fd35289d01584a7
- Author: Alex Deucher <alexdeucher@gmail.com>
- Date: Mon Oct 6 18:00:08 2008 -0400
- set grey levels correctly for temporal dithering
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index 50e3681..fad5a10 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -346,6 +346,8 @@ atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr m
- disp_data2.ucTemporal = PANEL_ENCODER_TEMPORAL_DITHER_EN;
- if (radeon_output->lvds_misc & (1 << 1))
- disp_data2.ucTemporal |= PANEL_ENCODER_TEMPORAL_DITHER_DEPTH;
- + if (((radeon_output->lvds_misc >> 2) & 0x3) == 4)
- + disp_data2.ucTemporal |= PANEL_ENCODER_TEMPORAL_LEVEL_4;
- }
- } else {
- if (mode->Clock > 165000)
- commit 5708624d1151877dd66a462d4a75fed6774604a7
- Author: Alex Deucher <alexdeucher@gmail.com>
- Date: Mon Oct 6 15:11:56 2008 -0400
- Turn coherent mode off by default on DVI
- diff --git a/src/radeon_output.c b/src/radeon_output.c
- index 3416edf..8c794fb 100644
- --- a/src/radeon_output.c
- +++ b/src/radeon_output.c
- @@ -1158,7 +1158,7 @@ radeon_create_resources(xf86OutputPtr output)
- "RRConfigureOutputProperty error, %d\n", err);
- }
- - data = 1; /* use coherent mode by default */
- + data = 0; /* coherent mode off by default */
- err = RRChangeOutputProperty(output->randr_output, coherent_mode_atom,
- XA_INTEGER, 32, PropModeReplace, 1, &data,
- commit a5c5ce96279d01eb519bfb92b94c06a58acb7f07
- Author: Alex Deucher <alexdeucher@gmail.com>
- Date: Mon Oct 6 15:07:31 2008 -0400
- Refactor atom LCD/DFP output setup
- Simplify the code, properly handle dithering, coherent mode, encoding, etc.
- Should fix bug 17897.
- diff --git a/src/atombios_output.c b/src/atombios_output.c
- index 83b86a7..50e3681 100644
- --- a/src/atombios_output.c
- +++ b/src/atombios_output.c
- @@ -206,7 +206,8 @@ atombios_output_tv1_setup(xf86OutputPtr output, DisplayModePtr mode)
- int
- atombios_external_tmds_setup(xf86OutputPtr output, DisplayModePtr mode)
- {
- - RADEONInfoPtr info = RADEONPTR(output->scrn);
- + ScrnInfoPtr pScrn = output->scrn;
- + RADEONInfoPtr info = RADEONPTR(pScrn);
- ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION disp_data;
- AtomBiosArgRec data;
- unsigned char *space;
- @@ -218,7 +219,7 @@ atombios_external_tmds_setup(xf86OutputPtr output, DisplayModePtr mode)
- else
- disp_data.sXTmdsEncoder.ucMisc = 0;
- - if (!info->dac6bits)
- + if (pScrn->rgbBits == 8)
- disp_data.sXTmdsEncoder.ucMisc |= (1 << 1);
- data.exec.index = GetIndexIntoMasterTable(COMMAND, DVOEncoderControl);
- @@ -264,84 +265,107 @@ atombios_output_ddia_setup(xf86OutputPtr output, DisplayModePtr mode)
- }
- static int
- -atombios_output_tmds1_setup(xf86OutputPtr output, DisplayModePtr mode)
- +atombios_output_digital_setup(xf86OutputPtr output, int device, DisplayModePtr mode)
- {
- - RADEONInfoPtr info = RADEONPTR(output->scrn);
- - TMDS1_ENCODER_CONTROL_PS_ALLOCATION disp_data;
- + RADEONOutputPrivatePtr radeon_output = output->driver_private;
- + ScrnInfoPtr pScrn = output->scrn;
- + RADEONInfoPtr info = RADEONPTR(pScrn);
- + LVDS_ENCODER_CONTROL_PS_ALLOCATION disp_data;
- + LVDS_ENCODER_CONTROL_PS_ALLOCATION_V2 disp_data2;
- AtomBiosArgRec data;
- unsigned char *space;
- + int index;
- + int major, minor;
- - disp_data.ucAction = 1;
- - if (mode->Clock > 165000)
- - disp_data.ucMisc = 1;
- - else
- - disp_data.ucMisc = 0;
- - disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- - data.exec.index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
- - data.exec.dataSpace = (void *)&space;
- - data.exec.pspace = &disp_data;
- -
- - if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
- - ErrorF("Output TMDS1 setup success\n");
- - return ATOM_SUCCESS;
- + switch (device) {
- + case ATOM_DEVICE_DFP1_SUPPORT:
- + index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
- + break;
- + case ATOM_DEVICE_LCD1_SUPPORT:
- + index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
- + break;
- + case ATOM_DEVICE_DFP3_SUPPORT:
- + index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
- + break;
- + default:
- + return ATOM_NOT_IMPLEMENTED;
- + break;
- }
- - ErrorF("Output TMDS1 setup failed\n");
- - return ATOM_NOT_IMPLEMENTED;
- -
- -}
- -
- -static int
- -atombios_output_tmds2_setup(xf86OutputPtr output, DisplayModePtr mode)
- -{
- - RADEONInfoPtr info = RADEONPTR(output->scrn);
- - TMDS2_ENCODER_CONTROL_PS_ALLOCATION disp_data;
- - AtomBiosArgRec data;
- - unsigned char *space;
- -
- - disp_data.ucAction = 1;
- - if (mode->Clock > 165000)
- - disp_data.ucMisc = 1;
- - else
- - disp_data.ucMisc = 0;
- - disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- - data.exec.index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
- - data.exec.dataSpace = (void *)&space;
- - data.exec.pspace = &disp_data;
- + atombios_get_command_table_version(info->atomBIOS, index, &major, &minor);
- - if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
- - ErrorF("Output TMDS2 setup success\n");
- - return ATOM_SUCCESS;
- + /*ErrorF("table is %d %d\n", major, minor);*/
- + switch (major) {
- + case 0:
- + case 1:
- + switch (minor) {
- + case 1:
- + disp_data.ucMisc = 0;
- + disp_data.ucAction = PANEL_ENCODER_ACTION_ENABLE;
- + if (radeon_output->type == OUTPUT_HDMI)
- + disp_data.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
- + disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- + if (device == ATOM_DEVICE_DFP1_SUPPORT) {
- + if (radeon_output->lvds_misc & (1 << 0))
- + disp_data.ucMisc |= PANEL_ENCODER_MISC_DUAL;
- + if (radeon_output->lvds_misc & (1 << 1))
- + disp_data.ucMisc |= (1 << 1);
- + } else {
- + if (mode->Clock > 165000)
- + disp_data.ucMisc |= PANEL_ENCODER_MISC_DUAL;
- + if (pScrn->rgbBits == 8)
- + disp_data.ucMisc |= (1 << 1);
- + }
- + data.exec.pspace = &disp_data;
- + break;
- + case 2:
- + case 3:
- + disp_data2.ucMisc = 0;
- + disp_data2.ucAction = PANEL_ENCODER_ACTION_ENABLE;
- + if (minor == 3) {
- + if (radeon_output->coherent_mode) {
- + disp_data2.ucMisc |= PANEL_ENCODER_MISC_COHERENT;
- + xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Coherent Mode enabled\n");
- + }
- + }
- + if (radeon_output->type == OUTPUT_HDMI)
- + disp_data2.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
- + disp_data2.ucTruncate = 0;
- + disp_data2.ucSpatial = 0;
- + disp_data2.ucTemporal = 0;
- + disp_data2.ucFRC = 0;
- + if (device == ATOM_DEVICE_DFP1_SUPPORT) {
- + if (radeon_output->lvds_misc & (1 << 0))
- + disp_data2.ucMisc |= PANEL_ENCODER_MISC_DUAL;
- + if (radeon_output->lvds_misc & (1 << 5)) {
- + disp_data2.ucSpatial = PANEL_ENCODER_SPATIAL_DITHER_EN;
- + if (radeon_output->lvds_misc & (1 << 1))
- + disp_data2.ucSpatial |= PANEL_ENCODER_SPATIAL_DITHER_DEPTH;
- + }
- + if (radeon_output->lvds_misc & (1 << 6)) {
- + disp_data2.ucTemporal = PANEL_ENCODER_TEMPORAL_DITHER_EN;
- + if (radeon_output->lvds_misc & (1 << 1))
- + disp_data2.ucTemporal |= PANEL_ENCODER_TEMPORAL_DITHER_DEPTH;
- + }
- + } else {
- + if (mode->Clock > 165000)
- + disp_data2.ucMisc |= PANEL_ENCODER_MISC_DUAL;
- + }
- + data.exec.pspace = &disp_data2;
- + break;
- + }
- + break;
- }
- - ErrorF("Output TMDS2 setup failed\n");
- - return ATOM_NOT_IMPLEMENTED;
- -}
- -
- -static int
- -atombios_output_lvds_setup(xf86OutputPtr output, DisplayModePtr mode)
- -{
- - RADEONInfoPtr info = RADEONPTR(output->scrn);
- - LVDS_ENCODER_CONTROL_PS_ALLOCATION disp_data;
- - AtomBiosArgRec data;
- - unsigned char *space;
- -
- - disp_data.ucAction = 1;
- - if (mode->Clock > 165000)
- - disp_data.ucMisc = 1;
- - else
- - disp_data.ucMisc = 0;
- - disp_data.usPixelClock = cpu_to_le16(mode->Clock / 10);
- - data.exec.index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
- + data.exec.index = index;
- data.exec.dataSpace = (void *)&space;
- - data.exec.pspace = &disp_data;
- if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
- - ErrorF("Output LVDS setup success\n");
- + ErrorF("Output digital setup success\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement