From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753873AbcD2Pgm (ORCPT ); Fri, 29 Apr 2016 11:36:42 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36801 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694AbcD2Pgk (ORCPT ); Fri, 29 Apr 2016 11:36:40 -0400 Date: Fri, 29 Apr 2016 17:36:37 +0200 From: Daniel Vetter To: Tomi Valkeinen Cc: Noralf =?iso-8859-1?Q?Tr=F8nnes?= , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/7] drm/fb-helper: Add fb_deferred_io support Message-ID: <20160429153636.GE14148@phenom.ffwll.local> Mail-Followup-To: Tomi Valkeinen , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org References: <1461856717-6476-1-git-send-email-noralf@tronnes.org> <1461856717-6476-4-git-send-email-noralf@tronnes.org> <572358A0.8010002@ti.com> <20160429145524.GC14148@phenom.ffwll.local> <57237702.8060305@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57237702.8060305@ti.com> X-Operating-System: Linux phenom 4.6.0-rc5+ User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 29, 2016 at 06:00:18PM +0300, Tomi Valkeinen wrote: > > On 29/04/16 17:55, Daniel Vetter wrote: > > >> Who's calling {write,fillrect,copyarea,imageblit} in an atomic context? > >> That sounds like a very bad idea to me... > >> > >> If this is only for accumulating changes, I think it may be better to > >> leave that to the driver as it may have better idea of how to accumulate. > >> > >> But, of course, this is a helper, so if all the drivers use this kind of > >> accumulation, it makes sense =). > > > > Apparently panic context and cursor timer and stuff like that. I think > > this started with udl, and just to make sure (it's fbdev after all, no one > > wants to read the code itself) we've put those checks onto all entry > > points that draw stuff. It could be overkill, but this is what udl/qxl > > already do, so better to keep imo for now. > > > > I guess if it's really not needed we could later on change that, but not > > sure that's worth the effort. And we can't get rid of it entirely. > > Yep... Sounds fine to me. > > Someone should implement (minimal) fbdev userspace API support to DRM > without using the current fbdev, and implement fbcon on top of that. I > don't like how DRM and fbdev gets mixed... > > I offer a beer to anyone who does that =). The big plan that has been floated years back already (before David Herrmann disappeared into the rh systemd gang) was to have a pure userspace kmscon for console (including vt-switching in userspace like X does), plus a super-minimal panic console on top of kms in the kernel. That looked like a really solid design, unfornutately it didn't go anywhere. But basic patches are still around, and it really just boils down to that some distro would need to integrate kmscon properly, and polish of the kernel side too for integration. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Date: Fri, 29 Apr 2016 15:36:37 +0000 Subject: Re: [PATCH v4 3/7] drm/fb-helper: Add fb_deferred_io support Message-Id: <20160429153636.GE14148@phenom.ffwll.local> List-Id: References: <1461856717-6476-1-git-send-email-noralf@tronnes.org> <1461856717-6476-4-git-send-email-noralf@tronnes.org> <572358A0.8010002@ti.com> <20160429145524.GC14148@phenom.ffwll.local> <57237702.8060305@ti.com> In-Reply-To: <57237702.8060305@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org, laurent.pinchart@ideasonboard.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org On Fri, Apr 29, 2016 at 06:00:18PM +0300, Tomi Valkeinen wrote: > > On 29/04/16 17:55, Daniel Vetter wrote: > > >> Who's calling {write,fillrect,copyarea,imageblit} in an atomic context? > >> That sounds like a very bad idea to me... > >> > >> If this is only for accumulating changes, I think it may be better to > >> leave that to the driver as it may have better idea of how to accumulate. > >> > >> But, of course, this is a helper, so if all the drivers use this kind of > >> accumulation, it makes sense =). > > > > Apparently panic context and cursor timer and stuff like that. I think > > this started with udl, and just to make sure (it's fbdev after all, no one > > wants to read the code itself) we've put those checks onto all entry > > points that draw stuff. It could be overkill, but this is what udl/qxl > > already do, so better to keep imo for now. > > > > I guess if it's really not needed we could later on change that, but not > > sure that's worth the effort. And we can't get rid of it entirely. > > Yep... Sounds fine to me. > > Someone should implement (minimal) fbdev userspace API support to DRM > without using the current fbdev, and implement fbcon on top of that. I > don't like how DRM and fbdev gets mixed... > > I offer a beer to anyone who does that =). The big plan that has been floated years back already (before David Herrmann disappeared into the rh systemd gang) was to have a pure userspace kmscon for console (including vt-switching in userspace like X does), plus a super-minimal panic console on top of kms in the kernel. That looked like a really solid design, unfornutately it didn't go anywhere. But basic patches are still around, and it really just boils down to that some distro would need to integrate kmscon properly, and polish of the kernel side too for integration. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v4 3/7] drm/fb-helper: Add fb_deferred_io support Date: Fri, 29 Apr 2016 17:36:37 +0200 Message-ID: <20160429153636.GE14148@phenom.ffwll.local> References: <1461856717-6476-1-git-send-email-noralf@tronnes.org> <1461856717-6476-4-git-send-email-noralf@tronnes.org> <572358A0.8010002@ti.com> <20160429145524.GC14148@phenom.ffwll.local> <57237702.8060305@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 09C9D6E13E for ; Fri, 29 Apr 2016 15:36:41 +0000 (UTC) Received: by mail-wm0-x233.google.com with SMTP id e201so32463201wme.0 for ; Fri, 29 Apr 2016 08:36:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <57237702.8060305@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org, laurent.pinchart@ideasonboard.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org T24gRnJpLCBBcHIgMjksIDIwMTYgYXQgMDY6MDA6MThQTSArMDMwMCwgVG9taSBWYWxrZWluZW4g d3JvdGU6Cj4gCj4gT24gMjkvMDQvMTYgMTc6NTUsIERhbmllbCBWZXR0ZXIgd3JvdGU6Cj4gCj4g Pj4gV2hvJ3MgY2FsbGluZyB7d3JpdGUsZmlsbHJlY3QsY29weWFyZWEsaW1hZ2VibGl0fSBpbiBh biBhdG9taWMgY29udGV4dD8KPiA+PiBUaGF0IHNvdW5kcyBsaWtlIGEgdmVyeSBiYWQgaWRlYSB0 byBtZS4uLgo+ID4+Cj4gPj4gSWYgdGhpcyBpcyBvbmx5IGZvciBhY2N1bXVsYXRpbmcgY2hhbmdl cywgSSB0aGluayBpdCBtYXkgYmUgYmV0dGVyIHRvCj4gPj4gbGVhdmUgdGhhdCB0byB0aGUgZHJp dmVyIGFzIGl0IG1heSBoYXZlIGJldHRlciBpZGVhIG9mIGhvdyB0byBhY2N1bXVsYXRlLgo+ID4+ Cj4gPj4gQnV0LCBvZiBjb3Vyc2UsIHRoaXMgaXMgYSBoZWxwZXIsIHNvIGlmIGFsbCB0aGUgZHJp dmVycyB1c2UgdGhpcyBraW5kIG9mCj4gPj4gYWNjdW11bGF0aW9uLCBpdCBtYWtlcyBzZW5zZSA9 KS4KPiA+IAo+ID4gQXBwYXJlbnRseSBwYW5pYyBjb250ZXh0IGFuZCBjdXJzb3IgdGltZXIgYW5k IHN0dWZmIGxpa2UgdGhhdC4gSSB0aGluawo+ID4gdGhpcyBzdGFydGVkIHdpdGggdWRsLC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