Received: by 10.213.65.68 with SMTP id h4csp1315947imn; Wed, 4 Apr 2018 17:08:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/cE56kGiHcwRNzAv5geQBBqwopEtJ/dtOTptvrKmf8Nbi/qYRzxFMWKAar3RPVg0Kd+OcH X-Received: by 2002:a17:902:ab98:: with SMTP id f24-v6mr20229606plr.331.1522886926842; Wed, 04 Apr 2018 17:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522886926; cv=none; d=google.com; s=arc-20160816; b=sWjEPtkAZh2ZDi/EXcCKg56/AhdU1mMVLg8mgx5Dcaf4D26cacg/rtmsFozpMWiktG EQ3CwUp/AMevx3IIqqu+6frfwx7JYKv+wyhWJAbaDNfACre+S6t5M8AEfrGvJKhTjZ/6 kzC8QOPLzDKBuSOsadwom5oL2uB1ogYeLm2AZ8qA8J5HnwjG0B8hTDbEwRDMV46w4K6n q2yXA3uJSYss/PRM71WVLL0Vc413bIcLObU/a6TB3O6uFlrBAzBYGDATfpCz8r6FBoj1 QqgBignJbdvSYhq0QmStzzoKSlzhvWiegIjYMWry19hIAjoMTJ0J26sSotjV1H/TDKlw Hldw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=lMhGxeGYtBenPAvk1iXPc22vhOJYCHdHqmD/fQBUhUw=; b=UlmX/zZM2CGgo+Uk7xeCwY1OGVMhodkP4fOmg6Fv+3J7d1GV3GK5/Se8lGQu6CN9EB Cd58QzaJWRNzHG8Kc4axCe+/lXIRk2GWjd2T7Ax07CGBLKwC3zzAcLrluQwnF2We4xrI F7FjGL1OOfIRaWaaGAsCY+VxGSNN0SYgOqax0Z1kYOIvCaF9WBzsPna3TvBX04Nea1dW hGAZPafdone4dMKyJFjf0YL47shT40YTyafbjme9OOpIW7wlys8bVDwIwHMUSjG7//XR pGL+xn/n55N+Xx/MYTRerqhHkGc0rh4n/ZUTvHGYvijr8v4rvgaGXskrckVB9Ei6uuUP eY0g== ARC-Authentication-Results: i=1; mx.google.com; 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 v45si4522870pgn.379.2018.04.04.17.08.32; Wed, 04 Apr 2018 17:08:46 -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; 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 S1752764AbeDEAGB (ORCPT + 99 others); Wed, 4 Apr 2018 20:06:01 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:58452 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbeDEAGA (ORCPT ); Wed, 4 Apr 2018 20:06:00 -0400 X-Greylist: delayed 901 seconds by postgrey-1.27 at vger.kernel.org; Wed, 04 Apr 2018 20:06:00 EDT Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Wed, 4 Apr 2018 16:50:52 -0700 Received: from ubuntu.localdomain (promb-2n-dhcp336.eng.vmware.com [10.20.89.90]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 474E3B09B2; Wed, 4 Apr 2018 16:50:58 -0700 (PDT) From: Deepak Rawat To: , , CC: , , , , , , , , , , , Deepak Rawat Subject: [RFC 0/3] drm: page-flip with damage Date: Wed, 4 Apr 2018 16:49:05 -0700 Message-ID: <1522885748-67122-1-git-send-email-drawat@vmware.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-002.vmware.com: drawat@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? About overlaping of damage rectangles is also not finalized. This really depends on driver specific implementation and can be left open-ended? 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. 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