Re: [PATCH] vt_buffer: drop console buffer copying optimisations
On Thu 2015-01-29 14:11:25, Dave Airlie wrote: These two copy to/from VGA memory, however on the Silicon Motion SMI750 VGA card on a 64-bit system cause console corruption. This is due to the hw being buggy and not handling a 64-bit transaction correctly. We could try and create a 32-bit version of these routines, but I'm not sure the optimisation is worth much today. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1132826 Tested-by: Huawei engineering. Signed-off-by: Dave Airlie airl...@redhat.com Actually... are you sure this is right fix? IOW can gcc do the optimalization behind your back and still break the buggy card? Pavel diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h index 057db7d..f38c10b 100644 --- a/include/linux/vt_buffer.h +++ b/include/linux/vt_buffer.h @@ -21,10 +21,6 @@ #ifndef VT_BUF_HAVE_RW #define scr_writew(val, addr) (*(addr) = (val)) #define scr_readw(addr) (*(addr)) -#define scr_memcpyw(d, s, c) memcpy(d, s, c) -#define scr_memmovew(d, s, c) memmove(d, s, c) -#define VT_BUF_HAVE_MEMCPYW -#define VT_BUF_HAVE_MEMMOVEW #endif #ifndef VT_BUF_HAVE_MEMSETW -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [linux-pm] [PATCH] PM / i915: Skip kernel VT switch during suspend/resume if KMS is used
On Thu 2010-01-28 00:07:51, Stefan Seyfried wrote: Hi, On Tue, 26 Jan 2010 15:58:43 +0100 Pavel Machek pa...@ucw.cz wrote: We need vt switch when display is controlled by userland app directly accessing hw. It may or may not be X (svgalib anyone?, gtk-on-framebuffer? qtopia?). anything-on-framebuffer should not be different from plain framebuffer console, or am I missing something? It is. At least svgalib accesses hw directly. It probably can run even on framebuffer. Ideally, userspace should explicitely tell us. KD_KERNEL_GRAPHICS console mode? Plus the switch is needed for any graphics app using fbcon -- I do not think we actually save the framebuffer over suspend. (This one should probably be fixed). Framebuffer should be easy to fix - it works pretty well already because apparently the fbcon code needs to shadow buffer all VT windows anyway - so maybe it's just the issue of doing an additional redraw() somewhere appropriate. Well, for now the shadow buffer contains only text, not graphics images. So you'd need to enlarge it a lot. Doable but more than one liner. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] PM / i915: Skip kernel VT switch during suspend/resume if KMS is used
On Tue 2010-01-26 19:47:45, Rafael J. Wysocki wrote: On Tuesday 26 January 2010, Pavel Machek wrote: On Mon 2010-01-25 22:54:37, Rafael J. Wysocki wrote: On Monday 25 January 2010, Alan Cox wrote: But in that case we should be able to disable the VT switch disable path; we just have to check each driver as it's loaded. OK, what the right sequence of checks would be in that case and where to place them? Why are we even driving a vt switch direct from the suspend/resume logic ? The problem starts there. If it was being handled off the device suspend/resume method then there wouldn't be a mess to start with ? Start at the beginning - Why do we switch to arbitarily chosen 'last vt' - Why isn't vt related suspend/resume handled by the device Well, that was added long ago as a workaround for some problems people reported (presumably). I've never looked at that before, so I can't really tell why someone did it this particular way. As X drives hardware, it is/was neccessary to get control out of X and console switch was convenient. Note that it needs to happen with userland still active -- before freezer. Well, that's a bit cumbersome. (which was one of reasons it got special casing). And yes, it should be per-driver these days. That would have to be done using suspend notifiers and should depend on what driver actually controls the screen at the moment. And I guess the only case in which we actually _need_ to do the kernel VT switch is when the hardware is controlled by X and without KMS. We need vt switch when display is controlled by userland app directly accessing hw. It may or may not be X (svgalib anyone?, gtk-on-framebuffer? qtopia?). Ideally, userspace should explicitely tell us. KD_KERNEL_GRAPHICS console mode? Plus the switch is needed for any graphics app using fbcon -- I do not think we actually save the framebuffer over suspend. (This one should probably be fixed). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] PM / i915: Skip kernel VT switch during suspend/resume if KMS is used
On Tue 2010-01-26 13:46:01, H. Peter Anvin wrote: On 01/26/2010 06:58 AM, Pavel Machek wrote: That would have to be done using suspend notifiers and should depend on what driver actually controls the screen at the moment. And I guess the only case in which we actually _need_ to do the kernel VT switch is when the hardware is controlled by X and without KMS. We need vt switch when display is controlled by userland app directly accessing hw. It may or may not be X (svgalib anyone?, gtk-on-framebuffer? qtopia?). Ideally, userspace should explicitely tell us. KD_KERNEL_GRAPHICS console mode? It seems that the kernel would already know if it's in control of the mode switch, no? No, I do not think so. IIRC KD_GRAPHICS means console is under userland control; X will use it even if it does not directly talk to the hardware. IOW kernel knows if userland *may* be in control of graphics hardware. (And yes, not switching consoles when console is in KD_TEXT should be easy and obvious optimalization). Currently we have #define KD_TEXT 0x00 #define KD_GRAPHICS 0x01 #define KD_TEXT00x02/* obsolete */ #define KD_TEXT10x03/* obsolete */ I guess KD_KERNEL_GRAPHICS (or KD_INDIRECT_GRAPHICS or KD_GRAPHICS_BUT_KERNEL_CAN_DO_CONSOLE_SWITCHING or something like that) would be needed so that userland can indicate that no, cursor is no longer welcome on the screen but no, it is not accessing hw directly. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [2.6.29-rc3][Suspend regression][DRM, RADEON]
Are there any patch i could try? Is it possible to run a git bisect excluding all drm commits to find the other bug? hello, I tried 2.6.29-rc3, and things got a little better. Suspend/resume results in a garbage video, but now i have access to my desktop via SSH after resume; so only X/drm seems to be broken after resume. I (re)did the stupid replace of driver/gpu/drm and include /drm by 2.6.28 files, and have now been able to suspend/resume a few time. So in rc1-rc2 I had multiple bugs preventing me from STR, now there's only one left in DRM. My initial bisect was perhaps not so useless after all? Is it possible to run a bisect only for DRM changes? are there any logs, additionnal info I can provide? I think git bisect can do that, yes. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: in-kernel DRM tree move around....
On Thu 2008-05-29 10:46:22, Dave Airlie wrote: Hi, So I've been growing more annoyed with the current layout of the drm tree in the kernel, a) it lives under char. b) everything in one directory. c) header files in one directory. d) no header files exposed to userspace. http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=7df9a948d0f849466e3de259cccb49bc54cbad68 is a proposal to create drivers/gpu/drm, (I may move AGP in there as well later). It also creates per-driver subdirs. I'm unsure about agp... drivers/char/agp/*amd64* seems to contain gart/iommu stuff that is shared by whole kernel... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [RFC] full suspend/resume support for i915 DRM driver
Hi! We seem to see a lot of bug reports along the lines of, my machine resumes but I can't see X or, I can see X but only with a bright flashlight, etc. These sorts of problems are due to the fact that the X server isn't designed to do full state save/restore, and none of the available kernel drivers do it on its behalf. Since intelfb and the rest of the Intel drivers are fairly incompatible, this patch makes the DRM bind to the PCI device so it can register real suspend/resume handlers. Those handlers take care of saving and restoring enough state for X to come back reliably on at least one of my problematic test machines, but text mode still has trouble (still debugging VGA state save/restore, including trying to save/restore actual VRAM contents for possible hibernate support). How does this approach look? Is a new DRM driver flag a good thing for similar situations with other drivers? Thoughts? Looks okay to me... from very quick look. + if (!i915_pipe_enabled(dev, pipe)) + return; + + if (pipe == PIPE_A) + array = dev_priv-savePaletteA; coding style, we probably want save_palette_A. + unsigned long reg = pipe == PIPE_A ? PALETTE_A : PALETTE_B; Uff. Mixing = and == and ? in one expression is evil. I think I seen some #if 0 code just remove that. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel