summaryrefslogtreecommitdiff
path: root/linux-core
AgeCommit message (Collapse)Author
2007-07-03Simplification for previous commit.Michel Dänzer
Dave Airlie pointed out on IRC that idr_replace lets us know if the ID hasn't been allocated, so we don't need a special pointer value for allocated IDs that don't have valid information yet.
2007-07-03Restore pre-idr semantics for drawable information.Michel Dänzer
There's a difference between a drawable ID not having valid drawable information and not being allocated at all. Not making the distinction would break i915 DRM swap scheduling with older X servers that don't push drawable cliprect information to the DRM.
2007-07-02Fix must-check warnings and implement a few error paths.Kristian Høgsberg
2007-07-02Drop drm_drawable_list and add drm_drawable_info directly to the idr.Kristian Høgsberg
2007-06-29Convert a few more U32 variables to more appropriate, generic types.Ian Romanick
2007-06-29Convert xgi_mem_location enum values to less generic names.Ian Romanick
2007-06-29Convert open coded list iterators to either list_for_each_entry or ↵Ian Romanick
list_for_each_entry_safe
2007-06-29Clean up xgi_pcie_heap_checkIan Romanick
The whole purpose of xgi_pcie_heap_check is to log information about entries on the used_list. If XGI_DEBUG is not set, it doesn't print anything. Therefore we can #ifdef the whole function body. Convert open-code list iteration to use list_for_each_entry.
2007-06-29Stop-gap fix in xgi_submit_cmdlistIan Romanick
Comment in the code explains it. Basically, I put an if-statement around a block of code to prevent a NULL pointer dereference that should never happen in the first place. Eventually, this will need to come out.
2007-06-29Convert some PCI-e GART related variable to generic types.Ian Romanick
A few of the PCI-e GART related fields in struct xgi_info were hardcoded to u32. None of them need to be. Convert them to either unsigned int or bool.
2007-06-29Delete unused arrays s_emptyBegin and s_flush2D.Ian Romanick
2007-06-29Replace U(8|16) with u(8|16).Ian Romanick
2007-06-29Eliminate unnecessary defines of TRUE and FALSE.Ian Romanick
2007-06-29Replace BOOL with bool.Ian Romanick
2007-06-29Eliminate unused integer and float typedefs.Ian Romanick
2007-06-29Eliminate structure typedefsIan Romanick
Documentation/CodingStyle says that 'typedef struct foo foo_t' is evil. I tend to agree. Elminate all uses of such construct.
2007-06-29merge fixesAlan Hourihane
2007-06-29Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into ↵Alan Hourihane
modesetting-101 Conflicts: linux-core/drm_drv.c linux-core/drm_fops.c linux-core/drm_objects.h linux-core/drm_stub.c shared-core/i915_dma.c
2007-06-29Fix return type of xgi_find_pcie_block.Ian Romanick
This function used to return 'void *', which was then cast to 'xgi_pcie_block_t *' at the only caller. I changed the return type to 'struct xgi_pcie_block_s *' and removed the explicit cast.
2007-06-29Avoid hitting BUG() for kernel-only fence objects.Thomas Hellstrom
2007-06-29Fence object reference / dereference cleanup.Thomas Hellstrom
Buffer object dereference cleanup. Add a struct drm_device member to fence objects: This can simplify code, particularly in drivers.
2007-06-28Remove unused type 'struct xgi_pcie_list_s' / xgi_pcie_list_t.Ian Romanick
2007-06-28Minor clean up of variable declarations in xgi_find_pcie_virt.Ian Romanick
2007-06-28Clean up debug log messages in xgi_find_pcie_block.Ian Romanick
2007-06-28Convert comment header of xgi_find_pcie_virt to kernel doc format.Ian Romanick
2007-06-28Fix type/flags usage problem to check for preferred modes.Alan Hourihane
Add more debugging to help diagnose problems.
2007-06-28nouveau/nv50: skeletal backendBen Skeggs
2007-06-28nouveau: Nuke DMA_OBJECT_INIT ioctl (bumps interface to 0.0.7)Ben Skeggs
For various reasons, this ioctl was a bad idea. At channel creation we now automatically create DMA objects covering available VRAM and GART memory, where the client used to do this themselves. However, there is still a need to be able to create DMA objects pointing at specific areas of memory (ie. notifiers). Each channel is now allocated a small amount of memory from which a client can suballocate things (such as notifiers), and have a DMA object created which covers the suballocated area. The NOTIFIER_ALLOC ioctl exposes this functionality.
2007-06-26Clean up warnings about unused variables and functions.Ian Romanick
2007-06-26Clean up mixed declarations and code.Ian Romanick
2007-06-26Revert over-zealous change from previous commit.Ian Romanick
2007-06-26Add XGI driver to Makefiles.Ian Romanick
2007-06-26Clean up compile-time kernel feature detection.Ian Romanick
2007-06-26linux/config.h is deprecated or gone.Ian Romanick
2007-06-26Gut support for pre-2.6 kernels.Ian Romanick
2007-06-26dos2unix and LindentIan Romanick
2007-06-26Initial XP10 code drop from XGI.Ian Romanick
See attachment 10246 on https://bugs.freedesktop.org/show_bug.cgi?id=5921
2007-06-24nouveau: NV1X/2X/3X PFIFO engtab functionsBen Skeggs
Earlier NV1X chips use the NV04 code, see previous commits about NV10 RAMFC entry size.
2007-06-24nouveau: NV04 PFIFO engtab functionsBen Skeggs
2007-06-24nouveau: NV4X PFIFO engtab functionsBen Skeggs
2007-06-22Merge branch 'vblank-rework' into vblankJesse Barnes
2007-06-22more vblank reworkJesse Barnes
- use a timer for disabling vblank events to avoid enable/disable calls too often - make i915 work with pre-965 chips again (would like to structure this better, but this hack works on my test system)
2007-06-22Fix vblank wait condition.Michel Dänzer
Sync-to-vblank actually works again for me with radeon.
2007-06-22Use drm_calloc instead of assigning 0.Michel Dänzer
2007-06-18fix radeon setparam on 32/64 systems, harder.David Woodhouse
Commit 9b01bd5b284bbf519b726b39f1352023cb5e9e69 introduced a compat_ioctl handler for RADEON_SETPARAM, the sole purpose of which was to handle the fact that on i386, alignof(uint64_t)==4. Unfortunately, this handler was installed for _all_ 64-bit architectures, instead of only x86_64 and ia64. And thus it breaks 32-bit compatibility on every other arch, where 64-bit integers are aligned to 8 bytes in 32-bit mode just the same as in 64-bit mode. Arnd has a cunning plan to use 'compat_u64' with appropriate alignment attributes according to the 32-bit ABI, but for now let's just make the compat_radeon_cp_setparam routine entirely disappear on 64-bit machines whose 32-bit compat support isn't for i386. It would be a no-op with compat_u64 anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-06-15First cut at radeon support for the vblank rework.Jesse Barnes
2007-06-15i915: Fix handling of breadcrumb counter wraparounds.Michel Dänzer
2007-06-15Remove DRIVER_IRQ_VBL(2).Michel Dänzer
If the driver doesn't support vertical blank interrupts, it won't call drm_vblank_init(), and dev->num_crtcs will be 0. Also fix an off-by-one test against dev->num_crtcs.
2007-06-15Make vblank waitqueue per CRTC.Michel Dänzer
2007-06-15Fix i915 sequence mask.Thomas Hellstrom
pan class="hl opt">(output, DPMSModeOn); } } static void radeon_ms_output_mode_set(struct drm_output *output, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { struct drm_radeon_private *dev_priv = output->dev->dev_private; struct radeon_ms_connector *connector = output->driver_private; struct radeon_ms_crtc *crtc; struct radeon_ms_output *routput = NULL; int i; if (connector == NULL) { return; } if (output->crtc == NULL) { return; } crtc = output->crtc->driver_private; connector->crtc = crtc->crtc; /* catch unknown crtc */ switch (connector->crtc) { case 1: case 2: break; default: /* error */ return; } for (i = 0; i < RADEON_MAX_OUTPUTS; i++) { routput = radeon_ms_connector_get_output(dev_priv, connector, i); if (routput) { routput->connector = connector; routput->mode_set(routput, mode, adjusted_mode); } } } static enum drm_output_status radeon_ms_output_detect(struct drm_output *output) { struct radeon_ms_connector *connector = output->driver_private; if (connector == NULL || connector->i2c == NULL) { return output_status_unknown; } kfree(connector->edid); connector->edid = drm_get_edid(output, &connector->i2c->adapter); if (connector->edid == NULL) { return output_status_unknown; } return output_status_connected; } static int radeon_ms_output_get_modes(struct drm_output *output) { struct radeon_ms_connector *connector = output->driver_private; int ret = 0; if (connector == NULL || connector->i2c == NULL) { return 0; } if (connector->edid == NULL) { return 0; } drm_mode_output_update_edid_property(output, connector->edid); ret = drm_add_edid_modes(output, connector->edid); kfree(connector->edid); connector->edid = NULL; return ret; } static void radeon_ms_output_cleanup(struct drm_output *output) { struct radeon_ms_connector *connector = output->driver_private; if (connector == NULL) { return; } if (connector->edid) { kfree(connector->edid); } connector->edid = NULL; connector->output = NULL; output->driver_private = NULL; } const struct drm_output_funcs radeon_ms_output_funcs = { .dpms = radeon_ms_output_dpms, .save = NULL, .restore = NULL, .mode_valid = radeon_ms_output_mode_valid, .mode_fixup = radeon_ms_output_mode_fixup, .prepare = radeon_ms_output_prepare, .mode_set = radeon_ms_output_mode_set, .commit = radeon_ms_output_commit, .detect = radeon_ms_output_detect, .get_modes = radeon_ms_output_get_modes, .cleanup = radeon_ms_output_cleanup, }; void radeon_ms_connectors_destroy(struct drm_device *dev) { struct drm_radeon_private *dev_priv = dev->dev_private; struct radeon_ms_connector *connector = NULL; int i = 0; for (i = 0; i < RADEON_MAX_CONNECTORS; i++) { if (dev_priv->connectors[i]) { connector = dev_priv->connectors[i]; dev_priv->connectors[i] = NULL; if (connector->output) { drm_output_destroy(connector->output); connector->output = NULL; } if (connector->i2c) { radeon_ms_i2c_destroy(connector->i2c); connector->i2c = NULL; } drm_free(connector, sizeof(struct radeon_ms_connector), DRM_MEM_DRIVER); } } } int radeon_ms_connectors_from_properties(struct drm_device *dev) { struct drm_radeon_private *dev_priv = dev->dev_private; struct radeon_ms_connector *connector = NULL; struct drm_output *output = NULL; int i = 0, c = 0; radeon_ms_connectors_destroy(dev); for (i = 0; i < RADEON_MAX_CONNECTORS; i++) { if (dev_priv->properties.connectors[i]) { connector = drm_alloc(sizeof(struct radeon_ms_connector), DRM_MEM_DRIVER); if (connector == NULL) { radeon_ms_connectors_destroy(dev); return -ENOMEM; } memcpy(connector, dev_priv->properties.connectors[i], sizeof(struct radeon_ms_connector)); connector->i2c = radeon_ms_i2c_create(dev, connector->i2c_reg, connector->name); if (connector->i2c == NULL) { radeon_ms_connectors_destroy(dev); return -ENOMEM; } output = drm_output_create(dev, &radeon_ms_output_funcs, connector->type); if (output == NULL) { radeon_ms_connectors_destroy(dev); return -EINVAL; } connector->output = output; output->driver_private = connector; output->possible_crtcs = 0x3; dev_priv->connectors[c++] = connector; } } return c; } int radeon_ms_connectors_from_rom(struct drm_device *dev) { struct drm_radeon_private *dev_priv = dev->dev_private; switch (dev_priv->rom.type) { case ROM_COMBIOS: return radeon_ms_connectors_from_combios(dev); } return 0; } void radeon_ms_outputs_destroy(struct drm_device *dev) { struct drm_radeon_private *dev_priv = dev->dev_private; int i = 0; for (i = 0; i < RADEON_MAX_OUTPUTS; i++) { if (dev_priv->outputs[i]) { drm_free(dev_priv->outputs[i], sizeof(struct radeon_ms_output), DRM_MEM_DRIVER); dev_priv->outputs[i] = NULL; } } } int radeon_ms_outputs_from_properties(struct drm_device *dev) { struct drm_radeon_private *dev_priv = dev->dev_private; int i = 0; int c = 0; radeon_ms_outputs_destroy(dev); for (i = 0; i < RADEON_MAX_OUTPUTS; i++) { if (dev_priv->properties.outputs[i]) { dev_priv->outputs[i] = drm_alloc(sizeof(struct radeon_ms_output), DRM_MEM_DRIVER); if (dev_priv->outputs[i] == NULL) { radeon_ms_outputs_destroy(dev); return -ENOMEM; } memcpy(dev_priv->outputs[i], dev_priv->properties.outputs[i], sizeof(struct radeon_ms_output)); dev_priv->outputs[i]->dev = dev; dev_priv->outputs[i]->initialize(dev_priv->outputs[i]); c++; } } return c; } int radeon_ms_outputs_from_rom(struct drm_device *dev) { struct drm_radeon_private *dev_priv = dev->dev_private; switch (dev_priv->rom.type) { case ROM_COMBIOS: return radeon_ms_outputs_from_combios(dev); } return 0; } void radeon_ms_outputs_restore(struct drm_device *dev, struct radeon_state *state) { struct drm_radeon_private *dev_priv = dev->dev_private; int i; for (i = 0; i < RADEON_MAX_OUTPUTS; i++) { if (dev_priv->outputs[i]) { dev_priv->outputs[i]->restore(dev_priv->outputs[i], state); } } } void radeon_ms_outputs_save(struct drm_device *dev, struct radeon_state *state) { struct drm_radeon_private *dev_priv = dev->dev_private; int i; for (i = 0; i < RADEON_MAX_OUTPUTS; i++) { if (dev_priv->outputs[i]) { dev_priv->outputs[i]->save(dev_priv->outputs[i], state); } } }