diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2007-07-03 15:53:56 -0600 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2007-07-06 17:00:27 -0600 |
commit | 247faeeb1d1c429800f187e08cfaa31407c660ff (patch) | |
tree | 2d975ce9b3d1a35a5d3eee78cbf11f802ee137a9 /src | |
parent | 610f9a6b443afa8e40637a62b2b377a992f5eb05 (diff) |
Make sure we turn on the video palette when video starts, and turn it off
when video ends.
Diffstat (limited to 'src')
-rw-r--r-- | src/amd_lx_video.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/amd_lx_video.c b/src/amd_lx_video.c index e09880f..e2e3fe3 100644 --- a/src/amd_lx_video.c +++ b/src/amd_lx_video.c @@ -51,6 +51,8 @@ #include <X11/extensions/Xv.h> #include "fourcc.h" #include "amd_fourcc.h" +#include "cim/cim_defs.h" +#include "cim/cim_regs.h" #define OFF_DELAY 200 #define FREE_DELAY 60000 @@ -462,6 +464,9 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, vSrcParams.flags = DF_SOURCEFLAG_IMPLICITSCALING; df_configure_video_source(&vSrcParams, &vSrcParams); + + /* Turn on the video palette */ + df_set_video_palette(NULL); df_set_video_enable(1, 0); } @@ -610,8 +615,12 @@ LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit) if (exit) { if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + unsigned int val; + df_set_video_enable(0,0); - df_set_video_palette(NULL); + /* Put the LUT back in bypass */ + val = READ_VID32(DF_VID_MISC); + WRITE_VID32(DF_VID_MISC, val | DF_GAMMA_BYPASS_BOTH); } if (pPriv->area) { @@ -664,9 +673,15 @@ LXVidBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) gp_wait_until_idle(); if (pPriv->offTime < now) { + unsigned int val; + df_set_video_enable(0, 0); pPriv->videoStatus = FREE_TIMER; pPriv->freeTime = now + FREE_DELAY; + + /* Turn off the video palette */ + val = READ_VID32(DF_VID_MISC); + WRITE_VID32(DF_VID_MISC, val | DF_GAMMA_BYPASS_BOTH); } } else { |