Received: by 10.192.165.156 with SMTP id m28csp944152imm; Thu, 19 Apr 2018 10:03:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx49owu2ZxM9//MG/325pLi9FWcMqW07FhaCZc8h3lUSe4QaWN0hX503Gd963/GzzQ4O1COt1 X-Received: by 10.98.86.16 with SMTP id k16mr6517212pfb.149.1524157419375; Thu, 19 Apr 2018 10:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524157419; cv=none; d=google.com; s=arc-20160816; b=TPAqQOZnkHG8JgDjbOJvZeVn3Kbl1rn8pw3K7WmSAe1Tz/PtWGpLFCiUcq6ZWtGS94 sxctn9pBJfFIj/NOzDAWZlTQTxD3luG8FqfZ+GDMEZM1fW3whQJmxQUvPggHphrUwQ4y jRzcWyK9Enk+6fNW4N8FCZU95Gf3NOt3XQ1h0+H8ezgA26blUyh/mwnhf/8tVVS0quUn axgksEoFXLAGZuqKUr5/0wktSuchGzzcJy2OlI5wHU2H4R15OYT3sCvvDXq2ltIp4vQk 4o8By37kcdRWaR4V+wwpQgO78UKNwtZa0OQwj55QnQrp+7GpDslSPfNP+OXhwZhGk9Vn WIew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=zo0nDtl57HapLiFn0QoExaGwfLMTWZKkJ+OOLxSlMcg=; b=XgeHUPPynUaXg+HIla2BzxpTVFdAJ58X9FrkTC1nBQh8uRpW/WlYONALuouf82/GAp eW+IObjy/1LGsFKbLGbe7O0FGnptO13zHqoMuZ+W/3n7EH9QAPCTzxIeJB7pFSVh+XvT dQnMLqywcDQH2IHZ7EnLNCbgMiL3z0yqs7NpnnGIlbAVWeQSXDXLW+NS9ICb4nIrtyUN gvQfIkCaknqgBslfO9dWILRCVnOvbkqA2gRAshx7FVadKsCfvRN4Sl57uxwQ4gR5ko38 0e4c5ptna6u4vqwZ46A6BwFbNKDfCvdfP6H504s/u1O6Yrw1u6uDfS+aGQE3aD3qtWdy fXIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=cxCgnKgY; dkim=pass header.i=@codeaurora.org header.s=default header.b=An96yWNE; 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 t16si3690140pfj.10.2018.04.19.10.03.23; Thu, 19 Apr 2018 10:03:39 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=cxCgnKgY; dkim=pass header.i=@codeaurora.org header.s=default header.b=An96yWNE; 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 S1753644AbeDSRAj (ORCPT + 99 others); Thu, 19 Apr 2018 13:00:39 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60988 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753201AbeDSRAh (ORCPT ); Thu, 19 Apr 2018 13:00:37 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8D50B60C65; Thu, 19 Apr 2018 17:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524157236; bh=Z9mEzMu0zMJ3HdW9Qe0/aAOdtCUNFkQiJTOJXDBFuC4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=cxCgnKgYuzNTqMHOAVMollT24zPNiAJmjY4KsJUpT45JyXv+s+nPleqO14twxA8Zb JSE1KmOK5Wz/zvbmowyPGHa4kTiAFV0XA8de2wBF+RT22Vgz5urQxdkvZ+871yVtU2 R1EAQbdBqKvpmPj6rtwJIlb8sKB2ouWmGKEazBnw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.0.90] (unknown [106.51.29.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E959F602B8; Thu, 19 Apr 2018 17:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524157235; bh=Z9mEzMu0zMJ3HdW9Qe0/aAOdtCUNFkQiJTOJXDBFuC4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=An96yWNEGsTHCThno6eBvBgcNXMSvDvaXuw+VCmdk8Pp4JYBEJHgkcFta4V2t+iNg iKZSb9/YqzKfX/bQDqmXw6XmPHXLI5ghxKICWN9cbdMeYlEoRf9ko6BIUnKmMro031 22l1L5aKAf8W+9k9F1ZyHnSTvbLNwBN7jQGpWvYw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E959F602B8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH] drm: clarify adjusted_mode documentation for bridges To: Philippe CORNU , Laurent Pinchart , Daniel Vetter , Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Andrzej Hajda Cc: Benjamin Gaignard , Yannick FERTRE , Vincent ABRIOU References: <20180409152427.12449-1-philippe.cornu@st.com> From: Archit Taneja Message-ID: Date: Thu, 19 Apr 2018 22:30:27 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 19 April 2018 09:20 PM, Philippe CORNU wrote: > Hi Archit & Andrzej, > > May I ask you please a short review of this documentation update. > Many thanks > Philippe :-) > > On 04/09/2018 05:24 PM, Philippe Cornu wrote: >> This patch clarifies the adjusted_mode documentation >> for bridges. >> Reviewed-by: Archit Taneja >> Signed-off-by: Philippe Cornu >> Signed-off-by: Laurent Pinchart >> --- >> This patch follows discussions in: >> - "drm: clarify adjusted_mode for a bridge connected to a crtc" >> https://patchwork.freedesktop.org/patch/206801/ >> - "drm: bridge: Constify mode arguments to bridge .mode_set() operation" >> https://patchwork.freedesktop.org/patch/215449/ >> >> include/drm/drm_bridge.h | 16 ++++++++++++++++ >> include/drm/drm_crtc.h | 11 +++++++---- >> 2 files changed, 23 insertions(+), 4 deletions(-) >> >> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h >> index 3270fec46979..7d632c6a9214 100644 >> --- a/include/drm/drm_bridge.h >> +++ b/include/drm/drm_bridge.h >> @@ -178,6 +178,22 @@ struct drm_bridge_funcs { >> * then this would be &drm_encoder_helper_funcs.mode_set. The display >> * pipe (i.e. clocks and timing signals) is off when this function is >> * called. >> + * >> + * The adjusted_mode parameter corresponds to the mode output by the CRTC >> + * for the first bridge in the chain. It can be different from the mode >> + * parameter that contains the desired mode for the connector at the end >> + * of the bridges chain, for instance when the first bridge in the chain >> + * performs scaling. The adjusted mode is mostly useful for the first >> + * bridge in the chain and is likely irrelevant for the other bridges. >> + * >> + * For atomic drivers the adjusted_mode is the mode stored in >> + * &drm_crtc_state.adjusted_mode. >> + * >> + * NOTE: >> + * >> + * If a need arises to store and access modes adjusted for other locations >> + * than the connection between the CRTC and the first bridge, the DRM >> + * framework will have to be extended with DRM bridge states. >> */ >> void (*mode_set)(struct drm_bridge *bridge, >> struct drm_display_mode *mode, >> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h >> index a2d81d2907a9..65f749a9e9d3 100644 >> --- a/include/drm/drm_crtc.h >> +++ b/include/drm/drm_crtc.h >> @@ -134,10 +134,13 @@ struct drm_crtc_state { >> * >> * Internal display timings which can be used by the driver to handle >> * differences between the mode requested by userspace in @mode and what >> - * is actually programmed into the hardware. It is purely driver >> - * implementation defined what exactly this adjusted mode means. Usually >> - * it is used to store the hardware display timings used between the >> - * CRTC and encoder blocks. >> + * is actually programmed into the hardware. >> + * >> + * For drivers using drm_bridge, this stores the hardware display timings >> + * used between the CRTC and the first bridge. For other drivers, the >> + * meaning of the adjusted_mode field is purely driver implementation >> + * defined information, and will usually be used to store the hardware >> + * display timings used between the CRTC and encoder blocks. >> */ >> struct drm_display_mode adjusted_mode; >>