Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1997676rbb; Tue, 27 Feb 2024 07:38:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWnZ284NSmBAQ+xbYE4mrb8/zIlPUtXVcC9vdtv6dtDU/tqfsB+qHfbGU7aBumkH8/lxo9JWlgW+2lqzBDkqLOurfipYwMyQKCCu2Ju7w== X-Google-Smtp-Source: AGHT+IHRdhxWfqjjoINU4SmDVax53aiyD2krWqoldOI3vaZ6xZxqw79JqwfG7powE55GB6yXUUtJ X-Received: by 2002:a05:6a20:9c9b:b0:1a1:165c:bd74 with SMTP id mj27-20020a056a209c9b00b001a1165cbd74mr81362pzb.31.1709048329803; Tue, 27 Feb 2024 07:38:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709048329; cv=pass; d=google.com; s=arc-20160816; b=v+N6isSasXtdCc3lhF6ttovz0zYOK3R1D55EQ/epSSxAAIoW2evtVs+FquvC6Y1lAc VdCjuESEXSCwRx2USdwmfrOB07IWq++yOOXBBMWe0YbiCmKboMcT6XUDR+DGEC/tTlFh +W8jGojlF6GSBPSvs2pQT8qxsfuw7uqQ/XzfVebwprgTyr2mXUq7Lm9UUxhG4x84QVCW G/w8/LCwxJfFQhH3WQ0uD9A5gm4mwarU4Q02n7IO9KMHlTaqShMJCMRMUg5RvMgzTpAL /XO5Qdj5PGiAMv87GzHEavK6Jwc6Ab4vzk4BuMeBBuDY3rJcCQSMYN4/e9CjD91v0qe/ tp+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=wD53UKuw4zxoHOpXnQGMSfTDv9JExg1coPAv+jx4svI=; fh=pEOvsqHZyKeBaOjoipg1u26T/dNaZ9UU6E/qX0hC/Lo=; b=Lgx4CrMQ1hRmoATYnTVvTz81yjGtuhxs/8xDqkcHAb23Og7slriVqiuMv4YHXyHXr9 LCMmVMDostomvVUlcm8fW7fQhxWf4sIHcXqC5YPcLih13vbwCjkCfMcOklPKgTt4wvB4 EqUV1S8Sc/KLPCuQ/70DvLPs53FFX3H+yZokZgZkBlgo6zflG0EctYWrdg5w0xQc9AC2 dB4/1J5+Qw9scQuxxHeJdiqhjRaHkeKfmNlSg/Tmt++11/OzaWzTiRPGBihL2LG49p1Z k+XTHWx70DnK63P+YsaQlFncjX27bLgT73NrkS8vTwq9znI5zxUi945cc+HAbHICXj6F 2JPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=S5S8wzPZ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-83468-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q11-20020a63f94b000000b005d4a1e64c7asi5660261pgk.332.2024.02.27.07.38.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 07:38:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83468-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=S5S8wzPZ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-83468-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2EE5EB2B369 for ; Tue, 27 Feb 2024 15:06:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 980F914EFF7; Tue, 27 Feb 2024 15:02:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="S5S8wzPZ" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EDF414CAAB for ; Tue, 27 Feb 2024 15:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046143; cv=none; b=AZjHzZg0inHdTOkTP4dEGcJq8GAuShzFfVMuRgt7Mq3e2+y9zsLnC/AwJhuLmd0ZUZyL/RbX07PZxbe1F50pn3f0wRIG/BA3Ny5Qf4n4c46ztcd4x+ofPHQlCGW/hQey9Lqdh3eJ/iVa5r7ZO1k2y9921E0xWNIvfWMDGK3uqyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709046143; c=relaxed/simple; bh=VcmHARxCTfpmttLyfdAWI77rYXCBMJ5BgfJh3npQ1Rg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iWXwLsmg30/cEZ5JDPVyM6lPNU+dvV047j9MWyxlXlXoRB9dySMTTVcvKwvwuj0ei9xypXDrIATzUQCVLwO7aH7CFFfIJGi9CV2ycjHWMBtZx97gsc9PsgmcpaNf33a1GR+9gXdHIuKgYtf9M7IeI0kIWQgZrMCjgv94fA6pvNg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=S5S8wzPZ; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 1025860014; Tue, 27 Feb 2024 15:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709046134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wD53UKuw4zxoHOpXnQGMSfTDv9JExg1coPAv+jx4svI=; b=S5S8wzPZTwAnzhPdNHgvBSpPuxeFMNddFlI5FAvIXkIC0bw7wE2XCOGWOPB6c/l0WaAtqB Vap+q7sezl/pplwp2lQcyef0WDcrVNuKR32vUa3PDa1ZG3j2wVuca5GDHV3bHeHvyyautT qFN2zChzidAtscR/dxNmGhZc3JWylWv70vnrY/zDcoVY8GhZXrWIkKbLM4di3gDPSaBb3m mpjTVRBBchwaDTfxdScq7JQl4aBwkpELhdziP118IQJi9WzcxIyWercVM7JE6Z59kA5Wv2 0qW/bQyNVRg8csjClDzQW9wvJf5hf/gcFwEsLunYuGxwUAg9RfUe6NCEq83TqQ== Date: Tue, 27 Feb 2024 16:02:11 +0100 From: Louis Chauvet To: Arthur Grillo Cc: Rodrigo Siqueira , Melissa Wen , =?iso-8859-1?Q?Ma=EDra?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Jonathan Corbet , pekka.paalanen@haloniitty.fi, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, seanpaul@google.com, marcheu@google.com, nicolejadeyee@google.com Subject: Re: [PATCH v3 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions Message-ID: Mail-Followup-To: Arthur Grillo , Rodrigo Siqueira , Melissa Wen , =?iso-8859-1?Q?Ma=EDra?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Jonathan Corbet , pekka.paalanen@haloniitty.fi, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, seanpaul@google.com, marcheu@google.com, nicolejadeyee@google.com References: <20240226-yuv-v3-0-ff662f0994db@bootlin.com> <20240226-yuv-v3-4-ff662f0994db@bootlin.com> <848f2690-2f20-4a92-82ff-64cdee8cb2ee@riseup.net> 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=us-ascii Content-Disposition: inline In-Reply-To: <848f2690-2f20-4a92-82ff-64cdee8cb2ee@riseup.net> X-GND-Sasl: louis.chauvet@bootlin.com [...] > > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c > > index d5203f531d96..f68b1b03d632 100644 > > --- a/drivers/gpu/drm/vkms/vkms_plane.c > > +++ b/drivers/gpu/drm/vkms/vkms_plane.c > > @@ -106,6 +106,13 @@ static void vkms_plane_atomic_update(struct drm_plane *plane, > > return; > > > > fmt = fb->format->format; > > + pixel_read_t pixel_read = get_pixel_read_function(fmt); > > + > > + if (!pixel_read) { > > + DRM_WARN("Pixel format is not supported by VKMS planes. State is inchanged\n"); > > s/inchanged/unchanged/ Thanks for this correction. See my answer to [1], I changed the message a bit. [1]: https://lore.kernel.org/dri-devel/20240226133646.174d3fb2.pekka.paalanen@collabora.com/ Kind regards, Louis Chauvet > > + return; > > + } > > + > > vkms_plane_state = to_vkms_plane_state(new_state); > > shadow_plane_state = &vkms_plane_state->base; > > > > @@ -124,7 +131,7 @@ static void vkms_plane_atomic_update(struct drm_plane *plane, > > drm_rect_rotate(&frame_info->rotated, drm_rect_width(&frame_info->rotated), > > drm_rect_height(&frame_info->rotated), frame_info->rotation); > > > > - vkms_plane_state->pixel_read = get_pixel_conversion_function(fmt); > > + vkms_plane_state->pixel_read = pixel_read; > > } > > > > static int vkms_plane_atomic_check(struct drm_plane *plane, > > diff --git a/drivers/gpu/drm/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c > > index c8582df1f739..c92b9f06c4a4 100644 > > --- a/drivers/gpu/drm/vkms/vkms_writeback.c > > +++ b/drivers/gpu/drm/vkms/vkms_writeback.c > > @@ -140,6 +140,13 @@ static void vkms_wb_atomic_commit(struct drm_connector *conn, > > if (!conn_state) > > return; > > > > + pixel_write_t pixel_write = get_pixel_write_function(wb_format); > > + > > + if (!pixel_write) { > > + DRM_WARN("Pixel format is not supported by VKMS writeback. State is inchanged\n"); > > Same here > > Best Regards, > ~Arthur Grillo > > > + return; > > + } > > + > > vkms_set_composer(&vkmsdev->output, true); > > > > active_wb = conn_state->writeback_job->priv; > > @@ -150,7 +157,7 @@ static void vkms_wb_atomic_commit(struct drm_connector *conn, > > crtc_state->wb_pending = true; > > spin_unlock_irq(&output->composer_lock); > > drm_writeback_queue_job(wb_conn, connector_state); > > - active_wb->pixel_write = get_pixel_write_function(wb_format); > > + active_wb->pixel_write = pixel_write; > > drm_rect_init(&wb_frame_info->src, 0, 0, crtc_width, crtc_height); > > drm_rect_init(&wb_frame_info->dst, 0, 0, crtc_width, crtc_height); > > } > > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com