From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E99E2C433EF for ; Fri, 5 Nov 2021 18:02:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B382B61037 for ; Fri, 5 Nov 2021 18:02:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B382B61037 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2535A6EC7E; Fri, 5 Nov 2021 18:02:36 +0000 (UTC) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B6AB6EC7E for ; Fri, 5 Nov 2021 18:02:34 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id w29so3409295wra.12 for ; Fri, 05 Nov 2021 11:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=wxGKxEHljASS5rB7voToZN/AMD1KStDY75a5p4ffPiw=; b=en+3TI/Udn7dHS5mVo4zeHiPR4Z3SDUkMmKjZ8ZZdnvfwNqY+Pi6XKHHsxFJEuAGNY 9vcecMNkSBJIyNBubF2ynEejPNlwjEAnQsmdmRseFesA47YZDrFZkFZ6bRgq3adRhDXi Ltm0Lk7y/jOtF1C9YJjWkS3hnUvZuVSuE+VJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=wxGKxEHljASS5rB7voToZN/AMD1KStDY75a5p4ffPiw=; b=h3i0OFRnjpx0OAb1a+K+/ygkJQq4V0iqqIV32CdYjU2lC6qA31mC1/DWVimZoRW6w8 AWNb7xd4Kzf4yGFq8iLQecRhS/4KjmTRUhCCMcqjul8F3iq0qavHTmHJKOMcLV0tsVfA ST0nZGnhsO0Z0UVfDHIxcP543YiPUgCS7KRCyWFcb0zVQ2prs82ANHLt9JATj4fKLsNp beL8edPZAhMgwClnF7l5gEGxjyHwHgo6sywPJ9FqKA7uVdBawKKqssPqgQwY3N5//JAX 4RkJ0E8bPDPshp3eyPW7lDH2Eu84nzbBHypztBdqRSDuz1rYFkBfJMd83NZHupnwAzjJ HQOQ== X-Gm-Message-State: AOAM5326seWRKY5W/ZbdIR5AFGN04BwiuHips8162wQn6zDrT6pPJ3ai HXluvII4w6bx/xTHDFzAaMp8jA== X-Google-Smtp-Source: ABdhPJz7oIITjgoNuO3Z02F9mYAjRiZ4aSy7oJTIbdlboc/KTkkVDnS5eI8MygYZXCQKElN/uBe9XA== X-Received: by 2002:adf:d20e:: with SMTP id j14mr66687298wrh.220.1636135352936; Fri, 05 Nov 2021 11:02:32 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id s13sm12001028wmc.47.2021.11.05.11.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 11:02:32 -0700 (PDT) Date: Fri, 5 Nov 2021 19:02:30 +0100 From: Daniel Vetter To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 02/13] drm/connector: Add helper to check if a mode requires scrambling Message-ID: References: <20211102145944.259181-1-maxime@cerno.tech> <20211102145944.259181-3-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 5.10.0-8-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Emma Anholt , Tim Gover , Dave Stevenson , David Airlie , dri-devel@lists.freedesktop.org, Jonathan Hunter , Thierry Reding , Maxime Ripard , Thomas Zimmermann , linux-tegra@vger.kernel.org, Daniel Vetter , Phil Elwell , Dom Cobley Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Nov 04, 2021 at 05:37:21PM +0200, Ville Syrjälä wrote: > On Tue, Nov 02, 2021 at 03:59:33PM +0100, Maxime Ripard wrote: > > --- a/include/drm/drm_modes.h > > +++ b/include/drm/drm_modes.h > > @@ -424,6 +424,21 @@ static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode) > > return mode->flags & DRM_MODE_FLAG_3D_MASK; > > } > > > > +/** > > + * drm_mode_hdmi_requires_scrambling - Checks if a mode requires HDMI Scrambling > > + * @mode: DRM display mode > > + * > > + * Checks if a given display mode requires the scrambling to be enabled. > > + * > > + * Returns: > > + * A boolean stating whether it's required or not. > > + */ > > +static inline bool > > +drm_mode_hdmi_requires_scrambling(const struct drm_display_mode *mode) > > +{ > > + return mode->clock > DRM_HDMI_14_MAX_TMDS_CLK_KHZ; > > +} > > That's only correct for 8bpc. The actual limit is on the TMDS clock (or > rather TMDS character rate as HDMI 2.0 calls it due to the 1/1 vs. 1/4 > magic for the actually transmitted TMDS clock). Yeah we might need to add the bus format for the cable here too, to make this complete. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch