summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-06-25 15:30:02 -0400
committerJordan Crouse <jordan.crouse@amd.com>2007-07-06 17:00:27 -0600
commit610f9a6b443afa8e40637a62b2b377a992f5eb05 (patch)
treec23e2f47fac83118671efddb0dcd3cf88bc89db5
parentfd870f7acd4654ea1b440925e78df2afc5bf7259 (diff)
Fix LX video downscaling
The GX video downscaling logic apparently isn't appropriate for the LX
-rw-r--r--src/amd_lx_video.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/amd_lx_video.c b/src/amd_lx_video.c
index e1e51aa..e09880f 100644
--- a/src/amd_lx_video.c
+++ b/src/amd_lx_video.c
@@ -365,6 +365,7 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height,
unsigned long yExtra, uvExtra = 0;
DF_VIDEO_POSITION vidPos;
DF_VIDEO_SOURCE_PARAMS vSrcParams;
+ int err;
memset(&vSrcParams, 0, sizeof(vSrcParams));
@@ -401,16 +402,14 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height,
/* Set up scaling */
df_set_video_filter_coefficients(NULL, 1);
-
- if ((drawW >= srcW) && (drawH >= srcH))
- df_set_video_scale(width, height, drawW, drawH,
- DF_SCALEFLAG_CHANGEX | DF_SCALEFLAG_CHANGEY);
- else if (drawW < srcW)
- df_set_video_scale(drawW, height, drawW, drawH,
- DF_SCALEFLAG_CHANGEX | DF_SCALEFLAG_CHANGEY);
- else if (drawH < srcH)
- df_set_video_scale(width, drawH, drawW, drawH,
- DF_SCALEFLAG_CHANGEX | DF_SCALEFLAG_CHANGEY);
+
+ err = df_set_video_scale(width, height, drawW, drawH,
+ DF_SCALEFLAG_CHANGEX | DF_SCALEFLAG_CHANGEY);
+ if (err != CIM_STATUS_OK) {
+ /* Note the problem, but do nothing for now. */
+ ErrorF("Video scale factor too large: %dx%d -> %dx%d\n",
+ width, height, drawW, drawH);
+ }
/* Figure out clipping */