From patchwork Tue Jun 18 02:41:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 11000839 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 B55C214B6 for ; Tue, 18 Jun 2019 02:42:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A54BD2874C for ; Tue, 18 Jun 2019 02:42:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9942A28A00; Tue, 18 Jun 2019 02:42:05 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 500C12874C for ; Tue, 18 Jun 2019 02:42:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE34C6E0CC; Tue, 18 Jun 2019 02:42:02 +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 606356E0CC for ; Tue, 18 Jun 2019 02:42:01 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id d17so8510953qtj.8 for ; Mon, 17 Jun 2019 19:42:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=IVz6BAknW6t/cZoUe0OsXuR9J6By+25KR1QWnphRfwQ=; b=GWNwNqyel+Xu2JRvvKx36CH67abTa8A525oWltp4zEpZrKoKR8XZBcENqzyLQGIlI4 7wY/HLRc2vfx35GY0910xZywcOv8d78anv3Q9PK2nBmvub2KduJZQgnzY3j4xMveeRh2 n+dGozfhlyISfjNQvEaqjhiG0Z2oEwIWayiL6k8qdHX9U6Z9JeDYSKyki6Om5Xe9OaLF 7LLsOqpJbi2ENA9mCZ8PIVt1sPHIRAerb4am4w94q7PA2NmvkTOw07yhK63QHHawY4fy sHFbmS+H4AqX4uB5UJyA1FtLAJyYnOtHB3aJibSGTendmWjgnJUqzNGpjvqhwlA8JjIy WK0w== X-Gm-Message-State: APjAAAVtzpyx7s6/4ovIoB/910VHX6P/W12euP8bHvPReFoWPJAEJ6fA 1LDQomIEYwK9j8bqmXs+FFw= X-Google-Smtp-Source: APXvYqxmov6aRqBgVgEHQVi8PRdHCcaCQsKljpg1j8I85jrk0Kp3f23uBl6FNdvQ3E04Jdsdhxi0sA== X-Received: by 2002:ac8:3345:: with SMTP id u5mr99447735qta.219.1560825720545; Mon, 17 Jun 2019 19:42:00 -0700 (PDT) Received: from smtp.gmail.com ([187.121.151.146]) by smtp.gmail.com with ESMTPSA id j184sm7209111qkc.65.2019.06.17.19.41.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 19:42:00 -0700 (PDT) Date: Mon, 17 Jun 2019 23:41:55 -0300 From: Rodrigo Siqueira To: Brian Starkey , Liviu Dudau , Daniel Vetter , Haneen Mohammed , Simon Ser Subject: [PATCH V2 0/5] drm/vkms: Introduces writeback support Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180716 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=IVz6BAknW6t/cZoUe0OsXuR9J6By+25KR1QWnphRfwQ=; b=uyNS/GgoiPmcE5pagyeBrTmsGE9qnYmNPJTsBX8mwc/tslW/kqrSuhBYGFUSP776cf 7RcDrg+2k+HBRegVEYZg9OEcra+jV5ZBehCwxdonN5aKo+n5Rw8ygsCRkFLQDbsJXncZ h9hcfuP0L/BQVpvAN8bYNyj9AcpsDpI3jrVjdb9lbJdI+OYCzSqm8FQIAyNKHEU5v2qT 59rJVJKWtZO0CubKK0FgtYUR1iBN/rCLZgU9DVvH1709zbnf/fKH9l7+jd2v3M04REqW DF8X0emOJktfBVF6ui9grAPjVfcHhrfHAzJn10KGAAAQ8jRWHid8ONlGrl3UWN9T4XMe r3jQ== 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: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patchset introduces the writeback support to vkms. As a pre-work, the first set of patches separates part of the code inside vkms_crc to a new file named vkms_composer; this change allows that other parts of the vkms take advantage of composing functions. Next, there's a patch that enables the virtual encoder to be compatible with the crtc when we have multiple encoders. The final patch adds the required implementation to enable writeback in the vkms. With this patchset, vkms can successfully pass all the kms_writeback tests from IGT. Note: This patchset depends on Daniel's rework of CRC, see it at https://patchwork.freedesktop.org/series/61737/ Rodrigo Siqueira (5): drm/vkms: Move functions from vkms_crc to vkms_composer drm/vkms: Rename crc_enabled to composer_enabled drm/vkms: Rename vkms_crc_data to vkms_data drm/vkms: Use index instead of 0 in possible crtc drm/vkms: Add support for writeback drivers/gpu/drm/vkms/Makefile | 10 +- drivers/gpu/drm/vkms/vkms_composer.c | 69 +++++++++++ drivers/gpu/drm/vkms/vkms_composer.h | 12 ++ drivers/gpu/drm/vkms/vkms_crc.c | 81 ++----------- drivers/gpu/drm/vkms/vkms_crtc.c | 2 +- drivers/gpu/drm/vkms/vkms_drv.c | 9 +- drivers/gpu/drm/vkms/vkms_drv.h | 18 ++- drivers/gpu/drm/vkms/vkms_output.c | 12 +- drivers/gpu/drm/vkms/vkms_plane.c | 40 +++---- drivers/gpu/drm/vkms/vkms_writeback.c | 166 ++++++++++++++++++++++++++ 10 files changed, 315 insertions(+), 104 deletions(-) create mode 100644 drivers/gpu/drm/vkms/vkms_composer.c create mode 100644 drivers/gpu/drm/vkms/vkms_composer.h create mode 100644 drivers/gpu/drm/vkms/vkms_writeback.c