summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2013-02-0842-1887/+2186
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next Alex writes: - CS ioctl cleanup and unification. Unification of a lot of functionality that was duplicated across multiple generates of hardware. - Add support for Oland GPUs - Deprecate UMS support. Mesa and the ddx dropped support for UMS and apparently very few people still use it since the UMS CS ioctl was broken for several kernels and no one reported it. It was fixed in 3.8/stable. - Rework GPU reset. Use the status registers to determine what blocks to reset. This better matches the recommended reset programming model. This also allows us to properly reset blocks besides GFX and DMA. - Switch the VM set page code to use an IB rather than the ring. This fixes overflow issues when doing large page table updates using a small ring like DMA. - Several small cleanups and bug fixes. * 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux: (38 commits) drm/radeon/dce6: fix display powergating drm/radeon: add Oland pci ids drm/radeon: radeon-asic updates for Oland drm/radeon: add ucode loading support for Oland drm/radeon: fill in gpu init for Oland drm/radeon: add Oland chip family drm/radeon: switch back to using the DMA ring for VM PT updates drm/radeon: use IBs for VM page table updates v2 drm/radeon: don't reset the MC on IGPs/APUs drm/radeon: use the reset mask to determine if rings are hung drm/radeon: halt engines before disabling MC (si) drm/radeon: halt engines before disabling MC (cayman/TN) drm/radeon: halt engines before disabling MC (evergreen) drm/radeon: halt engines before disabling MC (6xx/7xx) drm/radeon: use status regs to determine what to reset (si) drm/radeon: use status regs to determine what to reset (cayman) drm/radeon: use status regs to determine what to reset (evergreen) drm/radeon: use status regs to determine what to reset (6xx/7xx) drm/radeon: rework GPU reset on cayman/TN drm/radeon: rework GPU reset on cayman/TN ...
| * drm/radeon/dce6: fix display powergatingAlex Deucher2013-02-051-4/+2
| | | | | | | | | | | | | | | | | | | | Only enable it when we disable the display rather than at DPMS time since enabling it requires a full modeset to restore the display state. Fixes blank screens in certain cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: radeon-asic updates for OlandAlex Deucher2013-02-011-1/+5
| | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add ucode loading support for OlandAlex Deucher2013-02-011-0/+59
| | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fill in gpu init for OlandAlex Deucher2013-02-011-1/+19
| | | | | | | | Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add Oland chip familyAlex Deucher2013-02-013-0/+3
| | | | | | | | | | | | Oland is a new asic in the SI family. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: switch back to using the DMA ring for VM PT updatesAlex Deucher2013-02-011-3/+3
| | | | | | | | | | | | | | Now that we have switched to using IBs for page table updates, we can switch back the using the DMA ring. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use IBs for VM page table updates v2Alex Deucher2013-02-017-92/+103
| | | | | | | | | | | | | | | | | | | | | | | | For very large page table updates, we can exceed the size of the ring. To avoid this, use an IB to perform the page table update. v2(ck): cleanup the IB infrastructure and the use it instead of filling the struct ourself. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
| * drm/radeon: don't reset the MC on IGPs/APUsAlex Deucher2013-01-313-6/+12
| | | | | | | | | | | | The MC isn't part of the GPU per se. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use the reset mask to determine if rings are hungAlex Deucher2013-01-316-80/+173
| | | | | | | | | | | | | | fetch the reset mask and check if the relevant ring flags are set to determine whether the ring is hung or not. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (si)Alex Deucher2013-01-311-5/+7
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (cayman/TN)Alex Deucher2013-01-311-7/+7
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (evergreen)Alex Deucher2013-01-311-5/+7
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: halt engines before disabling MC (6xx/7xx)Alex Deucher2013-01-311-5/+5
| | | | | | | | | | | | It's better to halt the engines before we disable the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (si)Alex Deucher2013-01-312-34/+132
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (cayman)Alex Deucher2013-01-313-32/+136
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (evergreen)Alex Deucher2013-01-313-32/+145
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use status regs to determine what to reset (6xx/7xx)Alex Deucher2013-01-313-32/+136
| | | | | | | | | | | | | | When we attempt the reset the GPU, look at the status registers to determine what blocks need to be reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on cayman/TNAlex Deucher2013-01-311-92/+90
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on cayman/TNAlex Deucher2013-01-312-108/+92
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on evergreenAlex Deucher2013-01-311-76/+85
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rework GPU reset on r6xx/r7xxAlex Deucher2013-01-312-122/+129
| | | | | | | | | | | | | | Update the code to better match the recommended programming sequence for soft reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add a bios scratch asic hung helperAlex Deucher2013-01-315-0/+33
| | | | | | | | | | | | | | | | Used by all asic families from r600+. Flag for the vbios and later instances of the driver that the GPU is hung. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add additional reset flagsAlex Deucher2013-01-311-0/+9
| | | | | | | | | | | | This adds further flags for fine grained reset. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: Deprecate UMS support v2Christian König2013-01-3114-117/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | KMS support is out and stable for a couple of years now and the userspace code has deprecated or abandoned the old UMS interface. So make the KMS interface the default and deprecate the UMS interface in the kernel as well. v2: rebased on alex/drm-next-3.9-wip Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon/kms: cleanup async dma packet checkingJerome Glisse2013-01-313-435/+417
| | | | | | | | | | | | | | This simplify and cleanup the async dma checking. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: consolidate redundant macros and constantsIlija Hadzic2013-01-3112-104/+35
| | | | | | | | | | | | | | | | | | | | After refactoring the _cs logic, we ended up with many macros and constants that #define the same thing. Clean'em up. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use common next_reloc functionIlija Hadzic2013-01-316-295/+98
| | | | | | | | | | | | | | | | | | This patch eliminates ASIC-specific ***_cs_packet_next_reloc functions and hooks up the new common function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: pull out common next_reloc functionIlija Hadzic2013-01-312-0/+57
| | | | | | | | | | | | | | | | | | | | next_reloc function does the same thing in all ASICs with the exception of R600 which has a special case in legacy mode. Pull out the common function in preparation for refactoring. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: rename r100_cs_dump_packet to radeon_cs_dump_packetIlija Hadzic2013-01-316-51/+58
| | | | | | | | | | | | | | | | | | | | This function is not limited to r100, but it can dump a (raw) packet for any ASIC. Rename it accordingly and move its declaration to radeon.h Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add a check to wait_reg_mem commandIlija Hadzic2013-01-312-0/+11
| | | | | | | | | | | | | | | | | | | | WAIT_REG_MEM on register does not allow the use of PFP. Enforce this restriction when checking packets sent from userland. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: refactor vline packet parsing functionIlija Hadzic2013-01-314-117/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | vline packet parsing function for R600 and Evergreen+ are the same, except that they use different registers. Factor out the algorithm into a common function that uses register table passed from ASIC-specific caller. This reduces ASIC-specific function to (trivial) setup of register table and call into the common function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: factor out cs_next_is_pkt3_nop functionIlija Hadzic2013-01-315-48/+30
| | | | | | | | | | | | | | | | | | | | | | Once we factored out radeon_cs_packet_parse function, evergreen_cs_next_is_pkt3_nop and r600_cs_next_is_pkt3_nop functions became identical, so they can be factored out into a common function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: use common cs packet parse functionIlija Hadzic2013-01-315-157/+20
| | | | | | | | | | | | | | | | | | | | We now have a common radeon_cs_packet_parse function that is good for all ASICs. Hook it up and eliminate ASIC-specific versions. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: implement common cs packet parse functionIlija Hadzic2013-01-312-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | CS packet parse functions have a lot of in common across all ASICs. Implement a common function and take care of small differences between families inside the function. This patch is a prep for major refactoring and consolidation of CS parsing code. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fix formattingIlija Hadzic2013-01-311-23/+22
| | | | | | | | | | | | | | | | | | Preparatory patch: patches to follow will touch a piece of code that had broken indentication, so fix it before touching it. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove unused prototype from radeon_csIlija Hadzic2013-01-311-3/+0
| | | | | | | | | | | | Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove unecessary assignmentIlija Hadzic2013-01-311-4/+1
| | | | | | | | | | | | | | | | | | | | length_dw field was assigned twice. While at it, move user_ptr assignment together with all other assignments to p->chunks[i] structure to make the code more readable. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | Merge tag 'of_videomode_helper' of git://git.pengutronix.de/git/str/linux ↵Dave Airlie2013-02-0814-13/+558
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next videomode helpers for of + devicetree stuff, required for new kms drivers (not the fbdev maintainer). * tag 'of_videomode_helper' of git://git.pengutronix.de/git/str/linux: drm_modes: add of_videomode helpers drm_modes: add videomode helpers fbmon: add of_videomode helpers fbmon: add videomode helpers video: add of helper for display timings/videomode video: add display_timing and videomode viafb: rename display_timing to via_display_timing
| * | drm_modes: add of_videomode helpersSteffen Trumtrar2013-01-241-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper to get drm_display_mode from devicetree. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
| * | drm_modes: add videomode helpersSteffen Trumtrar2013-01-241-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add conversion from videomode to drm_display_mode Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
| * | fbmon: add of_videomode helpersSteffen Trumtrar2013-01-241-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper to get fb_videomode from devicetree. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
| * | fbmon: add videomode helpersSteffen Trumtrar2013-01-241-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function to convert from the generic videomode to a fb_videomode. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
| * | video: add of helper for display timings/videomodeSteffen Trumtrar2013-01-244-0/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for reading display timings from DT into a struct display_timings. The of_display_timing implementation supports multiple subnodes. All children are read into an array, that can be queried. If no native mode is specified, the first subnode will be used. For cases where the graphics driver knows there can be only one mode description or where the driver only supports one mode, a helper function of_get_videomode is added, that gets a struct videomode from DT. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
| * | video: add display_timing and videomodeSteffen Trumtrar2013-01-244-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add display_timing structure and the according helper functions. This allows the description of a display via its supported timing parameters. Also, add helper functions to convert from display timings to a generic videomode structure. The struct display_timing specifies all needed parameters to describe the signal properties of a display in one mode. This includes - ranges for signals that may have min-, max- and typical values - single integers for signals that can be on, off or are ignored - booleans for signals that are either on or off As a display may support multiple modes like this, a struct display_timings is added, that holds all given struct display_timing pointers and declares the native mode of the display. Although a display may state that a signal can be in a range, it is driven with fixed values that indicate a videomode. Therefore graphic drivers don't need all the information of struct display_timing, but would generate a videomode from the given set of supported signal timings and work with that. The video subsystems all define their own structs that describe a mode and work with that (e.g. fb_videomode or drm_display_mode). To slowly replace all those various structures and allow code reuse across those subsystems, add struct videomode as a generic description. This patch only includes the most basic fields in struct videomode. All missing fields that are needed to have a really generic video mode description can be added at a later stage. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Afzal Mohammed <Afzal@ti.com> Tested-by: Rob Clark <robclark@gmail.com> Tested-by: Leela Krishna Amudala <leelakrishna.a@gmail.com>
| * | viafb: rename display_timing to via_display_timingSteffen Trumtrar2013-01-246-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct display_timing is specific to the via subsystem. The naming leads to collisions with the new struct display_timing, which is supposed to be a shared struct between different subsystems. To clean this up, prepend the existing struct with the subsystem it is specific to. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* | | Merge branch 'udl-fixes' into drm-nextDave Airlie2013-02-084-25/+73
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for usb/udl devices * udl-fixes: drm/udl: disable fb_defio by default drm/udl: Inline memcmp() for RLE compression of xfer drm/udl: make usage as a console safer drm/usb: bind driver to correct device
| * | | drm/udl: disable fb_defio by defaultDave Airlie2013-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There seems to be a bad interaction between gem/shmem and defio on top, I get list corruption on the page lru in the shmem code. Turn it off for now until we get some more digging done. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/udl: Inline memcmp() for RLE compression of xferChris Wilson2013-02-081-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we use a variable length the compiler does not realise that it is a fixed value of either 2 or 4 bytes. Instead of performing the inline comparison itself, the compiler inserts a function call to the generic memcmp routine which is optimised for long comparisons of variable length. That turns out to be quite expensive... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/udl: make usage as a console saferDave Airlie2013-02-072-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Okay you don't really want to use udl devices as your console, but if you are unlucky enough to do so, you run into a lot of schedule while atomic due to printk being called from all sorts of funky places. So check if we are in an atomic context, and queue the damage for later, the next printk should cause it to appear. This isn't ideal, but it is simple, and seems to work okay in my testing here. (dirty area idea came from xenfb) fixes a bunch of sleeping while atomic issues running fbcon on udl devices. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>