From patchwork Thu May 2 19:49:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10927591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EE2F15A6 for ; Thu, 2 May 2019 19:50:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0638F204BA for ; Thu, 2 May 2019 19:50:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7D90204FA; Thu, 2 May 2019 19:50:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77D92204BA for ; Thu, 2 May 2019 19:50:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D44E1897BC; Thu, 2 May 2019 19:50:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8FE69897BC for ; Thu, 2 May 2019 19:49:59 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id a26so1738972qtp.11 for ; Thu, 02 May 2019 12:49:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B4fRccxteH7U4Umq9SZI1eb+ggXryoTT5T5yQ5UAlcs=; b=cv+VJujAUBr5mFHd8zSNAcdI0AdmqAvj8DiGHMXnoSh0JhUlTkM8AamKojfC+cX/v1 Dz1/Wdxt8uVAD7TcQVWcq8notQh9VOWgD6di5dgpkYFLCuDka2BLOIJJf2C+N9MdtreF Ak1+rLVHjgvda0wQzDMgeDybsog3jFepP4xK9vX0CQ1cyxtWl1Z4vlHiC1YVioNb1hRn YdN2OmCP5THQ9HeEUKeBTZmm0+Azd2HSgOPg+IPtKaS74yYQOaGAFUG5Ca+Sm1p1/oGx 87qm+9AjlWpOIp2AZrEaxIlUUrYjMIXgRCu3FMUeUslZKXIgPMNFKr0P2H+30svG09e6 CtcA== X-Gm-Message-State: APjAAAUsyg1NbmaK1mBfyPGFIdXP/XVqNRY5coVQ93quBymQ5JWTs8// OPF3oga2vHzfu5NNVtx+GIaO45FDPYg= X-Google-Smtp-Source: APXvYqxMly2Ei1+rRVfZZq4Gsqecj1+REarX6XrYCb1PoYRTIMNMsBKfAmzt8J2n1oWgfstBKPDr3Q== X-Received: by 2002:a0c:9e56:: with SMTP id z22mr4678120qve.173.1556826598494; Thu, 02 May 2019 12:49:58 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id k36sm34366qtc.52.2019.05.02.12.49.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 12:49:57 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 00/10] drm: Add self refresh helpers Date: Thu, 2 May 2019 15:49:42 -0400 Message-Id: <20190502194956.218441-1-sean@poorly.run> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B4fRccxteH7U4Umq9SZI1eb+ggXryoTT5T5yQ5UAlcs=; b=Jnhpcann7M0A+WlIPtQ1ET/xvjNR8cf1OLM8LM8Bu77tI3Ra7IpplGV7q/nhd5DFfy 8OThDlRTBnq50iNmbd2sZO670MKdEuvBrH4IPuO8USxgYmSaFIbF69WXnpptIvu8Wt0r 9YIRqGOazgIGPVPQ7fgLzq77VmRyVmsWi+TLhfsexzfsEwncyr/n/PbXbawgVskgfWH7 H2KjHwlQKZrisW8TjTWAaVoP8aB/zvCeckOBuEJ9yrVLD/Vrgs/SZy4hu2L6SHpctUxr uIGOHubMpuojNuiyrhN9KGizY/uwAif9CShhiP+4lXeZuZkPpzFBSoxKlX1X1SaUC1iE 16tA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Hey all, Back from my break from this. v3 isn't a whole lot different from v2, aside from the new helpers that I've added. These allowed me to remove some redundant state from connector and rely solely on crtc_state. Please take a look, Sean Sean Paul (10): drm: Add atomic variants of enable/disable to encoder helper funcs drm: Add drm_atomic_crtc_state_for_encoder helper drm: Add atomic variants for bridge enable/disable drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state drm: Add helpers to kick off self refresh mode in drivers drm/rockchip: Use dirtyfb helper drm/rockchip: Check for fast link training before enabling psr drm/rockchip: Use the helpers for PSR drm/rockchip: Don't fully disable vop on self refresh drm/rockchip: Use drm_atomic_helper_commit_tail_rpm Documentation/gpu/drm-kms-helpers.rst | 9 + drivers/gpu/drm/Makefile | 2 +- .../drm/bridge/analogix/analogix_dp_core.c | 266 +++++++++++----- .../drm/bridge/analogix/analogix_dp_core.h | 2 +- drivers/gpu/drm/drm_atomic.c | 2 + drivers/gpu/drm/drm_atomic_helper.c | 101 +++++- drivers/gpu/drm/drm_atomic_state_helper.c | 4 + drivers/gpu/drm/drm_atomic_uapi.c | 7 +- drivers/gpu/drm/drm_bridge.c | 110 +++++++ drivers/gpu/drm/drm_self_refresh_helper.c | 205 +++++++++++++ drivers/gpu/drm/i915/intel_atomic.c | 8 +- drivers/gpu/drm/i915/intel_dp_mst.c | 7 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 9 +- drivers/gpu/drm/i915/intel_tv.c | 8 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 +- drivers/gpu/drm/rcar-du/rcar_lvds.c | 12 +- drivers/gpu/drm/rockchip/Makefile | 3 +- .../gpu/drm/rockchip/analogix_dp-rockchip.c | 86 +++--- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 39 +-- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 290 ------------------ drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 30 -- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 71 ++++- drivers/gpu/drm/vc4/vc4_txp.c | 7 +- include/drm/bridge/analogix_dp.h | 4 - include/drm/drm_atomic.h | 15 + include/drm/drm_atomic_helper.h | 6 + include/drm/drm_bridge.h | 114 +++++++ include/drm/drm_connector.h | 14 + include/drm/drm_crtc.h | 19 ++ include/drm/drm_modeset_helper_vtables.h | 47 ++- include/drm/drm_self_refresh_helper.h | 22 ++ 32 files changed, 983 insertions(+), 543 deletions(-) create mode 100644 drivers/gpu/drm/drm_self_refresh_helper.c delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.c delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.h create mode 100644 include/drm/drm_self_refresh_helper.h