summaryrefslogtreecommitdiffstats
path: root/drivers/video/matrox/matroxfb_crtc2.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
commitb8553086288629b4efb77e97f5582e08bc50ad65 (patch)
tree0a19bd1c21e148f35c7a0f76baa4f7a056b966b0 /drivers/video/matrox/matroxfb_crtc2.c
parent75b6d92f2dd5112b02f4e78cf9f35f9825946ef0 (diff)
Merge with 2.4.0-test3-pre4.
Diffstat (limited to 'drivers/video/matrox/matroxfb_crtc2.c')
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c
index 1219c0f2f..f4824762b 100644
--- a/drivers/video/matrox/matroxfb_crtc2.c
+++ b/drivers/video/matrox/matroxfb_crtc2.c
@@ -527,6 +527,10 @@ static int matroxfb_dh_ioctl(struct inode* inode,
return -EINVAL;
if (tmp & ACCESS_FBINFO(output.ph))
return -EINVAL;
+ if (tmp & MATROXFB_OUTPUT_CONN_DFP)
+ return -EINVAL;
+ if ((ACCESS_FBINFO(output.ph) & MATROXFB_OUTPUT_CONN_DFP) && tmp)
+ return -EINVAL;
if (tmp == ACCESS_FBINFO(output.sh))
return 0;
ACCESS_FBINFO(output.sh) = tmp;
@@ -542,7 +546,11 @@ static int matroxfb_dh_ioctl(struct inode* inode,
{
u_int32_t tmp;
- tmp = ACCESS_FBINFO(output.all) & ~ACCESS_FBINFO(output.ph);
+ /* we do not support DFP from CRTC2 */
+ tmp = ACCESS_FBINFO(output.all) & ~ACCESS_FBINFO(output.ph) & ~MATROXFB_OUTPUT_CONN_DFP;
+ /* CRTC1 in DFP mode disables CRTC2 at all (I know, I'm lazy) */
+ if (ACCESS_FBINFO(output.ph) & MATROXFB_OUTPUT_CONN_DFP)
+ tmp = 0;
put_user_ret(tmp, (u_int32_t*)arg, -EFAULT);
return 0;
}
@@ -675,6 +683,10 @@ static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) {
if (ACCESS_FBINFO(output.all) & MATROXFB_OUTPUT_CONN_SECONDARY) {
ACCESS_FBINFO(output.sh) |= MATROXFB_OUTPUT_CONN_SECONDARY;
ACCESS_FBINFO(output.ph) &= ~MATROXFB_OUTPUT_CONN_SECONDARY;
+ if (ACCESS_FBINFO(output.all) & MATROXFB_OUTPUT_CONN_DFP) {
+ ACCESS_FBINFO(output.sh) &= ~MATROXFB_OUTPUT_CONN_DFP;
+ ACCESS_FBINFO(output.ph) &= ~MATROXFB_OUTPUT_CONN_DFP;
+ }
}
matroxfb_dh_set_var(&matroxfb_dh_defined, -2, &m2info->fbcon);