summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fb_helper.c
Commit message (Collapse)AuthorAgeFilesLines
* drm: fix regression in fb blank handlingZhenyu Wang2010-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | commit 731b5a15a3b1474a41c2ca29b4c32b0f21bc852e Author: James Simmons <jsimmons@infradead.org> Date: Thu Oct 29 20:39:07 2009 +0000 drm/kms: properly handle fbdev blanking uses DRM_MODE_DPMS_ON for FB_BLANK_NORMAL, but DRM_MODE_DPMS_ON is actually for turning output on instead of blank. This makes fb blank broken on my T61, it put LVDS on but leave pipe disabled which made screen totally white or caused some 'burning' effect. [airlied: James objects to this but at this point in 2.6.33, I can't see a patch that will fix this properly like he wants coming in time and otherwise this is a regression - proper fix for 2.6.34 hopefully.] Cc: James Simmons <jsimmons@infradead.org> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms/fb: check for depth changes from userspace for resizing.Dave Airlie2010-01-111-5/+4
| | | | | | | | | | If userspace (plymouth in this case) asks for a deeper depth, refuse it as well due to lack of resizing. This fixes an issue since < 32MB cards went to 8bpp and plymouth crashes on startup. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: Fix &&/|| confusion in drm_fb_helper_connector_parse_command_line()Roel Kluin2010-01-071-1/+1
| | | | | | | This always evaluates to true. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-core-next' into drm-linusDave Airlie2009-12-081-7/+16
|\ | | | | | | | | | | | | | | Bring all core drm changes into 2.6.32 tree and resolve the conflict that occurs. Conflicts: drivers/gpu/drm/drm_fb_helper.c
| * drm/kms: fix fb cmap allocation to use modeset->crtc not crtcBen Skeggs2009-12-081-1/+1
| | | | | | | | | | | | crtc may be undefined at this point. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: allocate framebuffer cmapClemens Ladisch2009-11-191-1/+7
| | | | | | | | | | | | | | | | | | Without an allocated colormap, FBIOGETCMAP fails. This would make programs restore an all-black colormap ("links -g") or fail to work altogether ("mplayer -vo fbdev2"). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handlingClemens Ladisch2009-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the framebuffer driver does not publish detailed timing information for the current video mode, the correct value for the pixclock field is zero, not -1. Since pixclock is actually unsigned, the value -1 would be interpreted as 4294967295 picoseconds (i.e., about 4 milliseconds) by register_framebuffer() and userspace programs. This patch allows X.org's fbdev driver to work. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: properly handle fbdev blankingJames Simmons2009-11-191-6/+9
| | | | | | | | | | | | | | | | I examined several fbdev drivers and foudn the blanking code in drm_fb_helper to be wrong. This patch fixes the fbdev blanking to behave like other fbdev drivers. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: fix kms/fbdev colormap support properly.Dave Airlie2009-10-281-13/+29
| | | | | | | | | | | | | | | | This sets the fbcon to use TRUECOLOR by default, it then only modifies the pseudo palette for fbcon, and only touches the real palette when in 8-bit pseudo color mode. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handlingClemens Ladisch2009-11-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the framebuffer driver does not publish detailed timing information for the current video mode, the correct value for the pixclock field is zero, not -1. Since pixclock is actually unsigned, the value -1 would be interpreted as 4294967295 picoseconds (i.e., about 4 milliseconds) by register_framebuffer() and userspace programs. This patch allows X.org's fbdev driver to work. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: typo fixJames Simmons2009-10-281-1/+1
| | | | | | | | | | | | I believe this is a typo. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: fix kms/fbdev colormap support properly.Dave Airlie2009-10-261-13/+29
|/ | | | | | | | This sets the fbcon to use TRUECOLOR by default, it then only modifies the pseudo palette for fbcon, and only touches the real palette when in 8-bit pseudo color mode. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/fb: add more correct 8/16/24/32 bpp fb support.Dave Airlie2009-10-061-33/+62
| | | | | | | | | | | | | The previous patches had some unwanted side effects, I've fixed the lack of 32bpp working, and fixed up 16bpp so it should also work. this also adds the interface to allow the driver to set a preferred console depth so for example low memory rn50 can set it to 8bpp. It also catches 24bpp on cards that can't do it and forces 32bpp. Tested on r100/r600/i945. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/fb: add setcmap and fix 8-bit support.Dave Airlie2009-10-051-5/+50
| | | | | | | | This adds support for the setcmap api and fixes the 8bpp support at least on radeon hardware. It adds a new load_lut hook which can be called once the color map is setup. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQMikael Pettersson2009-09-291-0/+2
| | | | | | | | | | | | Compiling DRM throws the following warning if MAGIC_SYSRQ is disabled: drivers/gpu/drm/drm_fb_helper.c:101: warning: 'sysrq_drm_fb_helper_restore_op' defined but not used Fix: place sysrq_drm_fb_helper_restore_op and associated definitions inside #ifdef CONFIG_MAGIC_SYSRQ. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/kms: make fb helper work for all drivers.Dave Airlie2009-09-281-1/+0
| | | | | | | This initialises the fb helper with the connector helper, so that the fb cmdline code works for intel as well. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: protect against fb helper not being created.Dave Airlie2009-09-261-2/+12
| | | | | | | If drivers don't init the fb helper on the connector, the cmdline code won't work, but it shouldn't crash either. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: start adding command line interface using fb.Dave Airlie2009-09-251-1/+223
| | | | | | | | | | | | | | | | | | | | | | | | [note this requires an fb patch posted to linux-fbdev-devel already] This uses the normal video= command line option to control the kms output setup at boot time. It is used to override the autodetection done by kms. video= normally takes a framebuffer as the first parameter, in kms it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output connector is specified the mode string will apply to all connectors. The mode specification used will match down the probed modes, and if no mode is found it will add a CVT mode that matches. video=1024x768 - all connectors match a 1024x768 mode or add a CVT on video=VGA-1:1024x768, VGA-1 connector gets mode only. The same strings as used in current fb modedb.c are used, except I've added three more letters, e, D, d, e = enable, D = enable Digital, d = disable, which allow a connector to be forced into a certain state. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fix drm_fb_helper handling of kernel crtcsJesse Barnes2009-09-181-37/+43
| | | | | | | | | | | | | The drm_fb_helper shouldn't mess with CRTCs that aren't enabled or in its initial config. Ideally it shouldn't even include CRTCs in its initial config if they're not in use, but my old fix for that no longer works. At any rate, this fixes a real bug I was seeing where after a console blank, both pipes would come back on, even though only one had been enabled before that. Since the other pipe had a bogus config, this led to some screen corruption. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: fix kms helper license + KconfigDave Airlie2009-09-081-0/+4
| | | | | | | Allow the KMS module to work properly, and also rename it to KMS_HELPER so its clearer what its for. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fix two issues with fb consolidation.Dave Airlie2009-08-311-1/+1
| | | | | | | | Set accel to none, we really don't want anyone thinking fb is an accel interface. Pass pitch not depth to function for intel. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: move driver specific fb common code to helper functions (v2)Dave Airlie2009-08-311-0/+697
Initially I always meant this code to be shared, but things ran away from me before I got to it. This refactors the i915 and radeon kms fbdev interaction layers out into generic helpers + driver specific pieces. It moves all the panic/sysrq enhancements to the core file, and stores a linked list of kernel fbs. This could possibly be improved to only store the fb which has fbcon on it for panics etc. radeon retains some specific codes used for a big endian workaround. changes: fix oops in v1 fix freeing path for crtc_info Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud