Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp969116lqs; Fri, 14 Jun 2024 10:36:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQWn14gNJRCGOvQrtGW5v4tbcLUfNTPpWSDnV7zceqslwVxtKZSfAr440edJHzvvdeUWqPpNK3VROEfZPjL3DHih830Kdg8ucClExOKA== X-Google-Smtp-Source: AGHT+IGHM0r9lWTxckV38iL2HI0v9O/FmiGrM9/HlISJSkl3Kkz/OkExKZNv7rJ3lQwJCzlGkls5 X-Received: by 2002:a05:6a20:430d:b0:1b6:db6c:11dd with SMTP id adf61e73a8af0-1bae7e29041mr4330274637.9.1718386598438; Fri, 14 Jun 2024 10:36:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718386598; cv=pass; d=google.com; s=arc-20160816; b=f7ZjhHm6lnrOyKYsN6Bua4loKeub9oBF3BoRqk9OLgRh8uVK7RPV54To/65DknRDGJ HUlURquJJtICJ5fn7TrNWErg0kjMdoBY/svXdJDyv+/IbaJJGvfhYaTs6Q8PbtjEN7nN rzcD68waICNP7WFAIv4OOUM/b1KPsekMs/oh8maElW2kUy2YF6+S9FfKHWUK36fWrS6N oTxNiw68a4Fvzwqvhf4X3xLR2axtIUaaHlNiYbuOVqam0MRYqb65TJg2/ebsxAgwkBzv FDNbP6JI97Wl9C2kvrXkGcJ/6gKiirX42jGmKBgzrfp5AQjgfol3Beld9ZdCSHv7Gq9Z rwzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aesDOEiRaG9Aa3dzWhXp6jZ8a3i1f0OGXi6kYr7Lp3g=; fh=eNWKvKwrh6NTiLhu3TbTdZwOtLfVkj+mdyLF+4wV52c=; b=zduF0c/aOsllCkK7QwCYVqEECAWjpioD4yshKaHT6iMgel6zRJq0bBqYanX5Z3Io7J xaoUJu4OTFfmS+Eob+die8u4YOPfpL0fM9w+9bQ2udaaRZk5COHD+THtKAVGv9tTfJIh BKiwh+k44a06gMup7R4GzXzH8iYQnC+sNYGPDZ7Srbx73D36e0lE22m7UQjZvvtMQdrk EEVH2yBhgcjE7wCNTPjulXp8wiJqUYvD4B+qXFsNXt5MP8AmGfnjtkaJ4R5jcapKm9nE FTAOCCnqvV4QPuq2VHrCHIo+khnWYEbQsb9wFUtT3vXGkcCJxhzACzw+JggbkiXleqvM hpwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bZWXR3Xo; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-215360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee453c432si2062661a12.564.2024.06.14.10.36.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:36:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bZWXR3Xo; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-215360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AEBD828D43D for ; Fri, 14 Jun 2024 17:33:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BB5919DF47; Fri, 14 Jun 2024 17:32:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bZWXR3Xo" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD08319AD48 for ; Fri, 14 Jun 2024 17:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718386353; cv=none; b=fQ9YYuqWla7KHcMxGssH+dYsEH6bLc2cqiAUx0zSHXXkEFxiXLN+oNimrHXPxaLRI+cFRlTPueBZxCYnNq7k9kJg/SIq9Pib1ShAjtCJbRTHLnSrOlTFhQmDwF3T31/oHkJIdq6dB9Ga6nCGB+DOcEIV37L4lbtmf+5dEoreDUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718386353; c=relaxed/simple; bh=Fyx4oZXYXOt7r5Bmb0RLqriW4Wv4h4xJOeKr4CmCXf4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BwUFno+v15fRIlbfBpdjgKJFLosFU2DXMsSoMQrsYj8ELkd/3QJCX1GjiM1VnpJkztNDyMmq/4kOO9wwwlt7egtI5e4FjriTJYM912b+Lr3nDcfii59a86Aq6rVLRytw6z3CCDmbE3NWLuUwKZfxyaCDXjm10OWB0CDsBm3jGVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bZWXR3Xo; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2ec002caf3eso40268301fa.1 for ; Fri, 14 Jun 2024 10:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718386350; x=1718991150; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=aesDOEiRaG9Aa3dzWhXp6jZ8a3i1f0OGXi6kYr7Lp3g=; b=bZWXR3XoxcBYX2qbpkUlX6hYdeLu6aDU0xDCpZU3VQhA1ZWugr0ArTmPA49w3NZ8DJ 5HykVNTGAKZMuQDgL5/tpZWnNMR/nQPaszPfxaZB56hFEb/LQ0HTRRJhuncB7t76Pn/F beGT8c2mt35SkyAp4/HPcUssNMwpcQtkQGPOSpGOzTMPjASldWFmznZL2J/ALZoo0UWm j9nwZFcbFVd/ptGQ3sTKe8lGIoJlL3k/+yRYtAT1Bs25+dP4Yaa0Uc/6d1LEMPXyIikz 9z5cx7s0afJoZTMQcYw5e55tOep1lupWuJfF3bbmG8LZJmjHtkht7FgN9RV/w8kcjzYE vq9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718386350; x=1718991150; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aesDOEiRaG9Aa3dzWhXp6jZ8a3i1f0OGXi6kYr7Lp3g=; b=Squg33nYPFQH2jVrw/QKDvdHHe75bPSHY3ra54ptCJ9hHgyBis3POwmg+bBui+uw01 16J2QBb6ySv3GjvlLnHjVAyknHicZIlKRUst9kBjcXknA9z4vVRqT7GbzWgg6cxHOpMH PlyblFR8GPZdP1ALPgNFu17l44zyKn3rs9CmVFqvlzEJVrG+x7+Xh0EfZbP1T4H0PUPi FwlFJ+CQdae+v0y7GeuwTyt25oDslOiswE2XP8jC55H6gIVkuoEaLKnfXFYJ6cmiXOV7 tds7TPK3TcohwLCN+z5+H0ieYlsO/xJk1olGAgOlnSbb6y3gPrI02fP9ma88CY3ZsjiO ynEA== X-Forwarded-Encrypted: i=1; AJvYcCVGMaPQ+xLQDaZN2/fwAz77BM4UGYT87pOnEoXHEhtnErAJrKteNFTdWWo3mZco7fRB+PFVQvt2vfPCeD0JoPymbTiyWF/NoOffyhsi X-Gm-Message-State: AOJu0YzDJgNsT/nsvvdiS7pJIQwhjPch43ODZ96OH5i+/CNTTITZEsJ7 ZKOp3xZe7w68Ci3FycjEQ8qJqvYVefHHv5tkg9czj/HH5f+NlxefjV5MxY26rBQ= X-Received: by 2002:a2e:8681:0:b0:2ec:18bc:c455 with SMTP id 38308e7fff4ca-2ec18bcc6a3mr19931571fa.10.1718386349908; Fri, 14 Jun 2024 10:32:29 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyybrhy-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::b8c]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ec05d08470sm5669821fa.60.2024.06.14.10.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:32:29 -0700 (PDT) Date: Fri, 14 Jun 2024 20:32:27 +0300 From: Dmitry Baryshkov To: =?utf-8?B?QW5kcsOp?= Almeida Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, kernel-dev@igalia.com, Melissa Wen , alexander.deucher@amd.com, christian.koenig@amd.com, Simon Ser , Pekka Paalanen , daniel@ffwll.ch, Daniel Stone , 'Marek =?utf-8?B?T2zFocOhayc=?= , Dave Airlie , ville.syrjala@linux.intel.com, Xaver Hugl , Joshua Ashton , Michel =?utf-8?Q?D=C3=A4nzer?= , Sam Ravnborg , Boris Brezillon , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Jani Nikula , Rodrigo Vivi , Karol Herbst , Lyude Paul Subject: Re: [PATCH v6 2/8] drm: Support per-plane async flip configuration Message-ID: References: <20240614153535.351689-1-andrealmeid@igalia.com> <20240614153535.351689-3-andrealmeid@igalia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240614153535.351689-3-andrealmeid@igalia.com> On Fri, Jun 14, 2024 at 12:35:29PM GMT, Andr? Almeida wrote: > Drivers have different capabilities on what plane types they can or > cannot perform async flips. Create a plane::async_flip field so each > driver can choose which planes they allow doing async flips. > > Signed-off-by: Andr? Almeida > --- > drivers/gpu/drm/drm_atomic_uapi.c | 4 ++-- > include/drm/drm_plane.h | 5 +++++ > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c > index 2e1d9391febe..ed1af3455477 100644 > --- a/drivers/gpu/drm/drm_atomic_uapi.c > +++ b/drivers/gpu/drm/drm_atomic_uapi.c > @@ -1079,9 +1079,9 @@ int drm_atomic_set_property(struct drm_atomic_state *state, > break; > } > > - if (async_flip && plane_state->plane->type != DRM_PLANE_TYPE_PRIMARY) { > + if (async_flip && !plane->async_flip) { So, after this patch async flips becomes disabled until the driver enables that manually. Whether that's desired or not is a separate topic, but this definitely should be explicitly mentioned in the commit message. > drm_dbg_atomic(prop->dev, > - "[OBJECT:%d] Only primary planes can be changed during async flip\n", > + "[PLANE:%d] does not support async flips\n", > obj->id); > ret = -EINVAL; > break; > diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h > index 9507542121fa..0bebc72af5c3 100644 > --- a/include/drm/drm_plane.h > +++ b/include/drm/drm_plane.h > @@ -786,6 +786,11 @@ struct drm_plane { > * @kmsg_panic: Used to register a panic notifier for this plane > */ > struct kmsg_dumper kmsg_panic; > + > + /** > + * @async_flip: indicates if a plane can do async flips > + */ > + bool async_flip; > }; > > #define obj_to_plane(x) container_of(x, struct drm_plane, base) > -- > 2.45.2 > -- With best wishes Dmitry