Bug 14581 - Zoomed video is not correctly handled in drivers/pcmcia/topic.h
Summary: Zoomed video is not correctly handled in drivers/pcmcia/topic.h
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: PCMCIA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-pcmcia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-10 20:45 UTC by Avi Cohen Stuart
Modified: 2009-11-11 19:11 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.31.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Avi Cohen Stuart 2009-11-10 20:45:17 UTC
The function topic97_zoom_video should be changed to the following:

static void topic97_zoom_video(struct pcmcia_socket *sock, int onoff)
{
	struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
	u8 reg_zv, reg;

	reg_zv = config_readb(socket, TOPIC97_ZOOM_VIDEO_CONTROL);
	if (onoff) {
		reg_zv |= TOPIC97_ZV_CONTROL_ENABLE;
		config_writeb(socket, TOPIC97_ZOOM_VIDEO_CONTROL, reg_zv);
		reg = config_readb(socket, TOPIC97_AUDIO_VIDEO_SWITCH);
		reg |= TOPIC97_AVS_AUDIO_CONTROL | TOPIC97_AVS_VIDEO_CONTROL;
		config_writeb(socket, TOPIC97_AUDIO_VIDEO_SWITCH, reg);
	}
	else {
		reg_zv &= ~TOPIC97_ZV_CONTROL_ENABLE;
		config_writeb(socket, TOPIC97_ZOOM_VIDEO_CONTROL, reg_zv);

		reg = config_readb(socket, TOPIC97_AUDIO_VIDEO_SWITCH);
		reg &= ~(TOPIC97_AVS_AUDIO_CONTROL | TOPIC97_AVS_VIDEO_CONTROL);
		config_writeb(socket, TOPIC97_AUDIO_VIDEO_SWITCH, reg);
	}

}

It is hard to test as there are not many laptops that still have a Zoomed Video CardBus enabled or there are only a few pcmcia cards that support Zoomed Video
The one I know is the Libretto 100CT and 110CT with a Zoomed Video port that works with the Margi DVD-to-Go which streams the decoded DVD stream into the video overlay plane via the PCMCIA Zoomed Video port.

You can find more information at http://www.xs4all.nl/~avics/Setting%20up%20Margi%20DVD.html.

The information has been retrieved from the Topic manual which can be optained from Toshiba.

Please contact me at avi dot cohenstuart at infor dot com for questions.
Comment 1 Andrew Morton 2009-11-10 20:54:29 UTC
Please email us a patch to fix this  (email, not bugzilla!).

See Documentation/SubmittingPatches for the procedure.

Suitable recipients are:

Dominik Brodowski <linux@dominikbrodowski.net>
linux-pcmcia@lists.infradead.org
linux-kernel@vger.kernel.org
Andrew Morton <akpm@linux-foundation.org>

Thanks.
Comment 2 Avi Cohen Stuart 2009-11-11 19:11:57 UTC
I've send a patch to Dominik Brodowski.

Note You need to log in before you can comment on or make changes to this bug.