Received: by 10.213.65.68 with SMTP id h4csp1617827imn; Thu, 5 Apr 2018 00:21:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx49XGrhaDCqDql/3R15F2ayJfOiBNkuK3N1zJUvqn/cmoWBZ8voFe7a6tb8AT5YMQw7xZyMW X-Received: by 2002:a17:902:744a:: with SMTP id e10-v6mr21730461plt.151.1522912885707; Thu, 05 Apr 2018 00:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522912885; cv=none; d=google.com; s=arc-20160816; b=a34AmNtPj4F2RvKJ0gVc/YeFkXMkjfgWsxQZHTJ5/Nv0ZX/FcENQy236+mVLCIxyNW 58MKiIfgn564dFhzO+oCOnc28y1wmKD+mF0C/MN34yfq/jwagUHdG6pLR6nBG8HbaSx/ beskEHUK/8ZZ7tHrOBxBRZhu64QPAsryr5t7CCWjNUssHXnbNfGeQBEG5JvgFYZo2qM5 dI8D28l/AGa3dtfc2sbY83np2oygTkl8HSv59WA5Q9fmotVHRo8IcaToqZRPWHtcEAFQ 7114hrjYjfbYLCrHmvBNpdT1siWCXUN1pRUQVYiYvPWO5Vy1gCML7iEw0PI81tXgpcRO M+OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=iRwwVpjpMJZU3GimuJPD1JxBNWpllAx//1v+WFQdo5Q=; b=MBegE+VEu9KNgiCS2ikYcvKgvJLLSRkqdfH2rNckSwfUUF+u26XpoRp1Jl5I8H4HLC 7w1JdxGspbI97Mzsn3Z7uRatvzcbch/IvzxGI4lEhUhzpuikh05bBOtiaLWszMvN6vv6 X5TaTnmRYb0uGEu/PyxlrhvmX8J4KtyY6nJvkSp+ABWrs8W7TzXDxDb9G6DUB1PO8Fwi BkkKKteEAcPv5IrXpPEbZOwyYK3ifuqTzDv7fZS+YUNNeRU9VasA3PbS/31vRIDHRfIP THFz56V+y3d2JKC0xNsE0nCLPjgvXLzEBNockp4k1W6E8G0KDCNAvP/myFCg3FDtvKpN FIgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=MLUtzzjT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p24si5467490pfh.328.2018.04.05.00.21.11; Thu, 05 Apr 2018 00:21:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=MLUtzzjT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272AbeDEHUD (ORCPT + 99 others); Thu, 5 Apr 2018 03:20:03 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35305 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbeDEHUC (ORCPT ); Thu, 5 Apr 2018 03:20:02 -0400 Received: by mail-wm0-f65.google.com with SMTP id r82so4010704wme.0 for ; Thu, 05 Apr 2018 00:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=iRwwVpjpMJZU3GimuJPD1JxBNWpllAx//1v+WFQdo5Q=; b=MLUtzzjT3aBzdepe/dWECJYgcbDVcxIQdKYnvobY6pGeZBnnaVfYYxeyI+zuas1mHV rGXxtZC5v5VToWTvRO0agyPqGvion49ewiN9/9vpQpb3BnbhdCfgwGu79PfDf7IrrMjo AOrOdjMbBletS+ClSF4GkCSbwT+Whiv0I9Bo0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=iRwwVpjpMJZU3GimuJPD1JxBNWpllAx//1v+WFQdo5Q=; b=qvhn8yxoUrQEzFQWrxAHQp0+qzkDanqxkoWg2fiTMBPB8fP121xxIRoPSySUNajlZd U70VfAULx0aVzKRqtHteyTI7fFwfT0hIFDfUxRR6LDX3+mxpLZmABhfkeomRbifaE2of LH0Hfium8UK2GEyPUujVNTdXKGywRRvqYSOmQOnZ8ZOrE6ubVvdeUvSyLiiZ4dvBmW8t qVqJzAG7ijZb1vMe2njBVK17dInRzW7ffivBE3VSMiOm1/JfRr5Ud5X5PW1NDXDQFcLb n6hIr4Dh3/bzyUGuzQJ3B85RiEwrQsu0PzowPR1SD2HhNUkNvk1rULkZAn4Vy0LCYDMc b2GA== X-Gm-Message-State: ALQs6tCLCTmvs9Iw0+CdoQ0KRjT+zfG7NBCOeeFenBRUrE9dUyCeM9eH FxhAHLPYYJM2uX1hZ2atyJcsOA== X-Received: by 10.80.142.220 with SMTP id x28mr1832430edx.128.1522912800766; Thu, 05 Apr 2018 00:20:00 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id s27sm4586449edm.78.2018.04.05.00.19.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Apr 2018 00:19:59 -0700 (PDT) Date: Thu, 5 Apr 2018 09:19:57 +0200 From: Daniel Vetter To: Deepak Rawat Cc: dri-devel@lists.freedesktop.org, thellstrom@vmware.com, syeh@vmware.com, linux-graphics-maintainer@vmware.com, daniel@ffwll.ch, ville.syrjala@linux.intel.com, lukasz.spintzyk@displaylink.com, noralf@tronnes.org, robdclark@gmail.com, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, linux-kernel@vger.kernel.org Subject: Re: [RFC 0/3] drm: page-flip with damage Message-ID: <20180405071957.GO3881@phenom.ffwll.local> Mail-Followup-To: Deepak Rawat , dri-devel@lists.freedesktop.org, thellstrom@vmware.com, syeh@vmware.com, linux-graphics-maintainer@vmware.com, ville.syrjala@linux.intel.com, lukasz.spintzyk@displaylink.com, noralf@tronnes.org, robdclark@gmail.com, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, linux-kernel@vger.kernel.org References: <1522885748-67122-1-git-send-email-drawat@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522885748-67122-1-git-send-email-drawat@vmware.com> X-Operating-System: Linux phenom 4.15.0-1-amd64 User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 04, 2018 at 04:49:05PM -0700, Deepak Rawat wrote: > Hi All, > > This is extension to Lukasz Spintzyk earlier draft of damage interface for drm. > Bascially a new plane property is added called "DAMAGE_CLIPS" which is simply > an array of drm_rect (exported to userspace as drm_mode_rect). The clips > represents damage in framebuffer coordinate of attached fb to the plane. > > Helper iterator is added to traverse the damage rectangles and get the damage > clips in framebuffer, plane or crtc coordinates as need by driver > implementation. Finally a helper to reset damage in case need full update is > required. Drivers interested in page-flip with damage should call this from > atomic_check hook. > > With the RFC for atomic implementation of dirtyfb ioctl I was thinking > should we need to consider dirty_fb flags, especially > DRM_MODE_FB_DIRTY_ANNOTATE_COPY to be passed with atomic > DAMAGE_CLIPS property blob? I didn't considered that untill now. If no driver > uses that in my opinion for simplicity this can be ignored? Last time I've checked no driver nor userspace really used this. I'd drop it for the new uapi like you've done. > About overlaping of damage rectangles is also not finalized. This really > depends on driver specific implementation and can be left open-ended? Overlapping is userspace being stupid imo :-) I guess we should say that drivers should at least not fall over overlapping rects, and if they can't handle them, either coalesce into one big rect, or split them on their own somehow. > My knowledge is limited to vmwgfx so would like to hear about other driver use > cases and this can be modified in keeping other drivers need. > > Going forward driver implementation for vmwgfx and user-space implementation > of kmscube/weston will be next step to test the changes. I think an implementation for -modesetting and weston would be perfect. Kmscube has very littel value for damage tracking purposes (it's not a full compositor, just renders new frame each scene). And for kms I'm not a fan of using vendor-specific drivers to demonstrate new generic uapi - way too big chances you're making some vendor driver specific hardcoded assumption that doesn't hold anywhere else. Also makes it harder for others to test-implement your uapi in their drivers. -Daniel > > Thanks, > Deepak > > Deepak Rawat (2): > drm: Add helper iterator functions to iterate over plane damage. > drm: Add helper to validate damage during modeset_check > > Lukasz Spintzyk (1): > drm: Add DAMAGE_CLIPS property to plane > > drivers/gpu/drm/drm_atomic.c | 42 +++++++++ > drivers/gpu/drm/drm_atomic_helper.c | 173 ++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/drm_mode_config.c | 5 ++ > drivers/gpu/drm/drm_plane.c | 12 +++ > include/drm/drm_atomic_helper.h | 41 +++++++++ > include/drm/drm_mode_config.h | 15 ++++ > include/drm/drm_plane.h | 16 ++++ > include/uapi/drm/drm_mode.h | 15 ++++ > 8 files changed, 319 insertions(+) > > -- > 2.7.4 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch