Alan Hourihane
191594ebd5
When no valid EDID modes are available, we bail.
...
This snippet adds a standard 640x480 @ 60Hz mode when
that occurs, so we can continue with a basic mode.
Should we do this here though ???
2007-04-18 12:07:55 +01:00
Alan Hourihane
ef2bce3a16
Merge remote branch 'origin/modesetting-101' into modesetting-101
2007-04-18 11:55:09 +01:00
Alan Hourihane
51e867c578
Support the RGB outputs of SDVO cards, which are essentially
...
VGA outs.
The drm_initial_config path has specific handling code to name
match for VGA, TMDS or LVDS. This is pretty restrictive and should
probably be dealt with to be more generic.
2007-04-18 11:53:25 +01:00
Alan Hourihane
ea8bcb466b
Check status after SDVO command for sdvo_set_control_bus_switch
2007-04-18 11:47:21 +01:00
Alan Hourihane
dc03e07f23
Move SDVO PENDING check to read_response so all SDVO commands
...
benefit from the spin loop.
2007-04-18 11:46:04 +01:00
Dave Airlie
20b2949e37
make sure TMDS gets a crtc
2007-04-18 14:55:43 +10:00
Dave Airlie
e46e028bd2
Merge branch 'origin' into modesetting-101
...
Conflicts:
linux-core/drm_bo.c
Merge in changes from master from Thomas fixiing TTM problems
2007-04-18 14:11:49 +10:00
Jesse Barnes
c71c44bb92
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
2007-04-17 18:20:05 -07:00
Jesse Barnes
4f0841a31c
Just use drm_output_destroy to cleanup LVDS failures. It'll call our cleanup
...
routine, which will take care of freeing our dev_priv and i2c ddc bus.
2007-04-17 18:03:14 -07:00
Dave Airlie
d20aaf4858
don't crash if no desired mode
2007-04-18 10:41:39 +10:00
Dave Airlie
2352ec9bfa
backout alanh's broken commit
2007-04-18 10:39:58 +10:00
David Airlie
7c9e19ba55
clean up ring buffer and TTM in i915_driver_unload
...
I've commented out the framebuffer for now
2007-04-18 10:39:27 +10:00
Jesse Barnes
73b031df61
Add framebuffer bo freeing to drm_mode_config_cleanup (seems like the best
...
place for now).
2007-04-17 17:30:46 -07:00
Jakob Bornecrantz
a45fa264f2
Lvds now power up backlight on commit
...
Now saves previous power level in prepare and sets
that power level in commit, should power level
be 0 it will set maximum level.
2007-04-17 22:27:46 +02:00
Jesse Barnes
1c7f895fa6
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
...
Conflicts:
shared-core/i915_init.c - reconcile with airlied's new code
2007-04-17 10:14:18 -07:00
Jesse Barnes
4e4d9cbeb3
Move initial framebuffer allocation and configuration to drm_initial_config,
...
remove i915_driver_load fb related stuff. Add a small helper for setting up
outputs.
2007-04-17 10:00:37 -07:00
Jesse Barnes
5e6c345396
Add prototypes for drm_bo_init_mm and drm_buffer_object_create for use by
...
in-kernel code.
2007-04-17 09:57:08 -07:00
Alan Hourihane
b729b919ba
Fix a register read that was swapped SDVOB/SDVOC
...
Check for the PENDING message when reading the attached
displays. Ensures the command has completed before continuing.
(probably need to check PENDING in other SDVO calls too)
2007-04-17 16:11:00 +01:00
Alan Hourihane
ecd9801c3c
Fix SDVO outputs
2007-04-17 16:09:40 +01:00
Thomas Hellstrom
5a96d59ce9
Don't always free up memory space when we unpin buffers.
2007-04-17 14:15:37 +02:00
Thomas Hellstrom
5432cc4abf
Fix buffer object reference problems.
...
(Reported by Dave Airlie).
2007-04-17 10:53:19 +02:00
Dave Airlie
1a5e647f63
I don't think this dec is necessary and my stuff all works without ..
...
with it everything falls over
2007-04-17 18:18:42 +10:00
Dave Airlie
56ef1ab8ac
add some missing export symbols
2007-04-17 18:18:25 +10:00
Dave Airlie
79aa1d5474
another large overhaul of interactions with userspace...
...
We need to keep a list of user created fbs to nuke on master exit.
We also need to use the bo properly.
2007-04-17 18:16:38 +10:00
Thomas Hellstrom
e91ceff6c9
Add a code comment.
2007-04-17 08:46:45 +02:00
Jakob Bornecrantz
cd5769c3b5
Fix offset should from pci device address
2007-04-16 20:54:24 +02:00
Thomas Hellstrom
e6e4946c82
Require the hardware lock for buffer creation
...
(since that implies a validate).
Fix drm_bo_wait_unfenced error messages and codes.
Fix some return codes from libdrm.
2007-04-16 16:23:05 +02:00
Jesse Barnes
2aa183db1f
Use drm_mem_reg_ioremap to map buffer object.
2007-04-14 15:35:38 -07:00
Jesse Barnes
65619cab27
Fix PRIV0 memory initialization (mm_init takes pages, not bytes), align fb
...
allocation correctly, and use drm_mem_reg_iomap to map ring buffer object.
2007-04-14 15:35:21 -07:00
Jakob Bornecrantz
c4e944182d
Added debug messages so we know which output we are dealing with
2007-04-13 10:13:25 +02:00
David Airlie
cc471a361f
i915/drm: clean up a lot of the i915/drm startup/teardown sequences
...
When the kernel driver is loaded it sets up a lot of stuff..
it tears down the same stuff on unload.
This add a new map type called DRM_DRIVER which means the driver will clean the mapping up
and fix up the map cleaner
2007-04-13 14:51:16 +10:00
David Airlie
27598bacfd
export drm_bo_driver_finish symbol
2007-04-13 14:50:31 +10:00
David Airlie
a890d596fc
revert LVDS destroy - this oops on sysfs on sdvo init of i2c bus
2007-04-13 14:50:31 +10:00
Jesse Barnes
9f0f6509f5
Move driver load call to after AGP init, in case the load routine needs AGP stuff.
2007-04-12 18:30:36 -07:00
Jesse Barnes
79b7a588bb
Oops, forgot to push the msleep() in the hotplug test. Wouldn't want to
...
spin in the kernel for a whole second w/o it...
2007-04-12 14:57:07 -07:00
Jesse Barnes
9a39cb9b9a
Use crtc_from_pipe call in intel_lvds.c and add get_mode panel mode detection. Also fix up error case for when LVDS mode can't be determined. Leave placeholder code in place for BIOS mode probing and platform quirks.
2007-04-12 12:43:47 -07:00
Jesse Barnes
6b229c1e59
Add new function for getting a CRTC pointer given a pipe number.
2007-04-12 12:41:56 -07:00
Jesse Barnes
9e5d61d5b8
Fix 945+ hotplug detection, remove some unused variables.
2007-04-12 12:40:51 -07:00
Jesse Barnes
fb3c82f1d8
Don't need a NULL check prior to calling kfree.
2007-04-12 11:50:57 -07:00
Jesse Barnes
c2fce380c2
Move i2c init back to where it belongs and add i2c unregistration in *_destroy.
2007-04-12 08:57:58 -07:00
Jesse Barnes
258e1cf703
Whitespace cleanup
2007-04-12 08:56:34 -07:00
Jesse Barnes
e7b97f5523
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
2007-04-12 08:55:51 -07:00
Jesse Barnes
f2e3d790ac
Revert "Export drm_setup for use by new driver init code.", we don't really want to use this function
...
This reverts commit e114b981bc
.
2007-04-12 08:53:03 -07:00
Alan Hourihane
cf01689143
Use drm_framebuffer instead of drm_crtc for fb & fbt
2007-04-12 15:12:00 +01:00
Alan Hourihane
a85440c8a6
Remove extraneous drm_crtc.h include
2007-04-12 15:11:38 +01:00
Alan Hourihane
9420ab4b41
Merge remote branch 'origin/modesetting-101' into modesetting-101
2007-04-12 15:10:08 +01:00
Dave Airlie
1bba3cb3b3
cleanup framebuffers on drm unload
2007-04-12 11:55:10 +10:00
Dave Airlie
fb6c5aacb9
only initialise modes when fbcon or fbset asks for it
2007-04-12 11:54:49 +10:00
Dave Airlie
b49b3ba4c1
set bracing style like Linux
2007-04-12 11:43:13 +10:00
Dave Airlie
a5cf4cc369
fix unbalanced lock and make sure mode list has modes so lvds code doesn't crash
2007-04-12 11:28:55 +10:00
Dave Airlie
981f8156de
allow framebuffer changes on the crtc setup
2007-04-12 08:54:31 +10:00
Dave Airlie
a81558d8b3
add getfb ioctl
2007-04-12 08:45:40 +10:00
Jesse Barnes
2e21779992
Add new buffer object type for kernel allocations that don't initially have a user mapping.
2007-04-11 12:51:52 -07:00
Jesse Barnes
63d4d40463
Fix i2c unregistration, cleanup panel_fixed_mode assignment.
2007-04-11 11:46:37 -07:00
Jesse Barnes
425da42e95
Whitespace cleanups.
2007-04-11 11:44:54 -07:00
Jesse Barnes
c731b68091
Fix EDID pixel clock calculation.
2007-04-11 11:42:00 -07:00
Jesse Barnes
cc7faa4de8
fix modeset cleanup for LVDS and reenable it in i915.
2007-04-11 07:21:24 -07:00
Jesse Barnes
dd00aa5851
export vblank routine for use by intel_display.c and intel_sdvo.c.
2007-04-11 07:08:48 -07:00
Jesse Barnes
f35db66906
Fixup DDC probing. We only have one DDC bus so we have to use it only
...
on demand, and unregister when we're done.
2007-04-11 07:08:29 -07:00
Jesse Barnes
78598fdaa8
Various changes for in-kernel modesetting:
...
- allow drm_buffer_object_create to be called w/o dev_mapping
- fixup i915 init code to allocate memory, fb and set modes right
- pass fb to drm_initial_config for setup
- change some debug output to make it easier to spot
- fixup lvds code to use DDC probing correctly
2007-04-11 07:07:54 -07:00
David Airlie
7e48d47fb5
line_length calculation was incorrect.. I now can get fbcon to run
2007-04-11 17:35:00 +10:00
David Airlie
0392badd84
oops for 32 pitch.. hey I can see stuff on fbcon now.. it looks like text.. just a bit garbled
2007-04-11 17:25:37 +10:00
David Airlie
1147fefed8
fixup framebuffer depth
2007-04-11 17:13:57 +10:00
David Airlie
a6cc6a778f
add support for setting a framebuffer depth
2007-04-11 17:13:45 +10:00
Dave Airlie
c582eaac19
add copyright statement
2007-04-11 16:34:40 +10:00
Dave Airlie
32f6a58db2
add initial drm_fb framebuffer
...
So far I can load fbcon, once I use my miniglx to add a framebuffer.
fbcon doesn't show anything on screen but baby steps and all that.
2007-04-11 16:33:03 +10:00
Dave Airlie
9d12da5917
only bo finish at driver unload
2007-04-11 14:34:22 +10:00
root
7e58276c76
Revert "Remove some delays from Intel i2c code, we'll need a more comprehensive fix"
...
This reverts commit c033698988
.
this break SDVO
2007-04-11 13:40:50 +10:00
David Airlie
44be9c9d59
add an fb count + id get to the get resources code path
2007-04-11 13:26:21 +10:00
David Airlie
3e994a56be
use fb pitch and fix up some whitespace
2007-04-11 13:26:21 +10:00
Jesse Barnes
f50eec752c
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
2007-04-10 17:58:30 -07:00
David Airlie
b62ffb8e91
fixup calculation to make sdvo work
2007-04-11 09:56:09 +10:00
Jesse Barnes
44a8761302
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into origin/modesetting-101
...
Conflicts:
linux-core/drm_crtc.c - trivial merge
linux-core/drm_crtc.h - trivial merge
linux-core/intel_display.c - crtc_config -> mode_config
shared-core/i915_dma.c - accommodate new init code in i915_init.c
2007-04-10 10:45:55 -07:00
Jesse Barnes
e114b981bc
Export drm_setup for use by new driver init code.
2007-04-10 10:31:58 -07:00
Jesse Barnes
b59285d738
Move i915 init code to new file, i915_init.c, and create a new high level
...
init routine that runs at driver load time.
2007-04-10 10:31:10 -07:00
Jesse Barnes
8785679f89
Remove some debug #if 0 codes and add a reminder to check locking around
...
output enumeration stuff.
2007-04-10 09:49:02 -07:00
Jesse Barnes
c033698988
Remove some delays from Intel i2c code, we'll need a more comprehensive fix
...
in the Linux i2c layer to make DDC reliable on old monitors.
2007-04-10 09:48:20 -07:00
Jesse Barnes
183cbd92dd
Finish bringing in LVDS code, re-add to Makefile. Needed other changes too:
...
- move EDID structures to drm_edid.h
- add EDID info structure to drm_output
- add a few routines to intel_display for getting current mode info
- add some prototypes to intel_drv.h and drm_crtc.h
2007-04-10 09:47:37 -07:00
David Airlie
50672adb31
add sdvo debugging output
2007-04-10 16:49:36 +10:00
David Airlie
b9c7fa55e2
fixup sarea writes for set pipe base and dpms
2007-04-10 16:32:17 +10:00
David Airlie
23a66fd506
fixup true/false in intel_sdvo.c
2007-04-10 16:26:07 +10:00
David Airlie
f1476e4e5c
re-tab and fixup the i915GM get core clock function to actually work
2007-04-10 16:25:52 +10:00
David Airlie
1e39dc4323
export output name to userspace
2007-04-10 16:25:31 +10:00
David Airlie
40bd6dcd86
set the base address of the CRTC correctly
2007-04-10 15:20:50 +10:00
David Airlie
65f465ed5a
fixup numerous issues with adding framebuffer support
...
This still isn't perfect but it fixes a few oopses and cleans up
some of the tabs and bugs in the original fb limit code
2007-04-10 14:49:49 +10:00
Jesse Barnes
c446bf50e3
Slam in most of X.Org's i830_lvds (not quite done yet so removed from Makefile.kernel too).
2007-04-09 20:46:38 -07:00
David Airlie
eb9bdc2787
mode: fixup problems with framebuffer add function
2007-04-10 11:51:31 +10:00
Dave Airlie
ed0ebd9d3d
make crtc_config be named mode_config
...
X.org calls this crtc_config but this is a bad name and will confuse ppl later
(and me now :-)
2007-04-10 18:56:02 +10:00
Jakob Bornecrantz
b50bda002b
add addfb/rmfb ioctls
...
Originally from Jakob, cleaned up by airlied.
2007-04-10 18:44:47 +10:00
Jesse Barnes
7e2b1a6cf5
Fix refresh calculation (mistakenly removed 1000 factor needed for integer calulations, fixed mode printout debugging routine instead).
2007-04-09 08:52:53 -07:00
Dave Airlie
a70f8e0ab2
radeon: add support for reverse engineered xpress200m
...
The IGPGART setup code was traced using mmio-trace on fglrx by myself
and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel.
This code doesn't let the 3D driver work properly as the card has no
vertex shader support.
Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this
work on.
2007-04-09 21:52:59 +10:00
Jesse Barnes
ab7ee9c1af
remove a printk to make things less verbose
2007-04-07 19:26:55 -07:00
Jesse Barnes
2430d0c315
just codingstyle cleanups
2007-04-07 19:25:25 -07:00
Jesse Barnes
491ed9e4c2
document drm_mode_duplicate and fix vrefresh calculation (off by 1000 error)
2007-04-07 19:24:53 -07:00
Jesse Barnes
13d4ea90c0
various cleanups to EDID code:
...
- pull in FB DDC code (we'll have to rewrite it anyway it appears)
- add comments
- note a few FIXMEs
- make it less quiet, and more informative when it actually does print
2007-04-07 19:24:09 -07:00
Jesse Barnes
a35ba455b2
make drmP.h include drm_crtc.h for CRTC related stuff.
...
fixup drm_crtc.c so it matches VGA and other outputs properly.
make drm_crtc.c less verbose.
add function declarations in drm_crtc.h for other files.
2007-04-07 19:22:39 -07:00
Dave Airlie
b25558bb73
fixup install target, not sure what I was smokin...
2007-04-07 07:21:05 +10:00
Eric Anholt
1c9ba24c2f
Add required permission notices for code copied from X.Org source.
2007-04-05 11:34:11 -07:00
Jesse Barnes
50ee722e01
Merge branch 'modesetting-101' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
2007-04-05 09:27:12 -07:00
Jesse Barnes
6f3534a13a
Add copyrights before I forget
2007-04-05 09:21:31 -07:00