Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755441AbaGVPRJ (ORCPT ); Tue, 22 Jul 2014 11:17:09 -0400 Received: from pegasos-out.vodafone.de ([80.84.1.38]:51367 "EHLO pegasos-out.vodafone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbaGVPRH (ORCPT ); Tue, 22 Jul 2014 11:17:07 -0400 X-Spam-Flag: NO X-Spam-Score: -0.045 Authentication-Results: rohrpostix2.prod.vfnet.de (amavisd-new); dkim=pass header.i=@vodafone.de X-DKIM: OpenDKIM Filter v2.6.8 pegasos-out.vodafone.de 2364572548B X-DKIM: OpenDKIM Filter v2.0.2 smtp-04.vodafone.de AAB11E8415 Message-ID: <53CE8060.8030500@vodafone.de> Date: Tue, 22 Jul 2014 17:16:48 +0200 From: =?ISO-8859-1?Q?Christian_K=F6nig?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Maarten Lankhorst , =?ISO-8859-1?Q?Christian_K=F6nig?= , Dave Airlie , Thomas Hellstrom , nouveau , LKML , dri-devel , Ben Skeggs , "Deucher, Alexander" Subject: Re: [PATCH 09/17] drm/radeon: use common fence implementation for fences References: <20140709093124.11354.3774.stgit@patser> <20140709122953.11354.46381.stgit@patser> <53CE2421.5040906@amd.com> <20140722114607.GL15237@phenom.ffwll.local> <20140722115737.GN15237@phenom.ffwll.local> <53CE56ED.4040109@vodafone.de> <53CE6FB0.90500@canonical.com> <53CE7410.3090603@amd.com> <53CE74B5.3000201@canonical.com> <53CE77B4.6020801@amd.com> <53CE7974.2010209@canonical.com> In-Reply-To: <53CE7974.2010209@canonical.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 22.07.2014 16:47, schrieb Maarten Lankhorst: > op 22-07-14 16:39, Christian K?nig schreef: >> Am 22.07.2014 16:27, schrieb Maarten Lankhorst: >>> op 22-07-14 16:24, Christian K?nig schreef: >>>>> No, you really shouldn't be doing much in the check anyway, it's meant to be a lightweight check. If you're not ready yet because of a lockup simply return not signaled yet. >>>> It's not only the lockup case from radeon I have in mind here. For userspace queues it might be necessary to call copy_from_user to figure out if a fence is signaled or not. >>>> >>>> Returning false all the time is probably not a good idea either. >>> Having userspace implement a fence sounds like an awful idea, why would you want to do that? >> Marketing moves in mysterious ways. Don't ask me, but that the direction it currently moves with userspace queues and IOMMU etc... >> >>> A fence could be exported to userspace, but that would only mean it can wait for it to be signaled with an interface like poll.. >> Yeah agree totally, but the point for the fence interface is that I can't predict what's necessary to check if a fence is signaled or not on future hardware. >> >> For the currently available radeon hardware I can say that reading a value from a kernel page is pretty much all you need. But for older hardware that was reading from a register which might become very tricky if the hardware is power off or currently inside a reset cycle. >> >> Because off this I would avoid any such interface if it's not absolutely required by some use case, and currently I don't see this requirement because the functionality you want to archive could be implemented without this. > Oh? I've already done that in radeon_fence, there is no way enable_signaling will fiddle with hardware registers during a reset cycle. > I've also made sure that __radeon_fence_is_signaled grabs exclusive_lock in read mode before touching any hw state. > > Older hardware also doesn't implement optimus, so I think power off is not much of a worry for them, if you could point me at the checking done for that I could make sure that this is the case. I'm not talking about any specific radeon hardware or use case here. As far as I can see you indeed solved all driver problems with the current interface design. The question I'm raising is if the current interface design needs as complex as it is. And my answer to this is a clear *no*, so why do you want to stick with this design? I still haven't understood that. If it's just to support a further feature of direct synchronization in interrupt context between different drivers then I must clearly say that this is a NAK, cause you add complexity to the kernel that isn't necessary. Christian. > > ~Maarten > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/