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 X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A20F0C4360C for ; Sat, 28 Sep 2019 01:31:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76B0B2146E for ; Sat, 28 Sep 2019 01:31:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="c17hv9Uh"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="gWltI+e8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728520AbfI1Bbp (ORCPT ); Fri, 27 Sep 2019 21:31:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46112 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbfI1Bbo (ORCPT ); Fri, 27 Sep 2019 21:31:44 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 01FDC61382; Sat, 28 Sep 2019 01:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569634303; bh=m/+SNT1ylRadZlQdB8fVjW39Gd/vKBoLUGrjef6eP84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c17hv9Uha9O4Yc5WUJbDaV5nqWB8BdZ8/SGEZA+53oA8BJXy1pkp4y784RDbcHdAd 29h33WwL7dII3xllCezwW3NAXzAYQGRu+RCjLElwnRSmQBl5vl7fF4xzg+d0oA9sj0 JMuKwvncRhseWWoa79v086YIoxDK/l1Js8tZilJ4= Received: from jeykumar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jsanka@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 48A1D61215; Sat, 28 Sep 2019 01:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569634300; bh=m/+SNT1ylRadZlQdB8fVjW39Gd/vKBoLUGrjef6eP84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWltI+e8ODxHtIEtclTtLsrsvPIs5a9B4Gwew/tlufCZvnw6SppeDSq0nMs/tFlje UFqToKo/LIIWRdNbhvAbgn6OzKFayULvC1QxqEbhX9fc0hVTCIAcDr2Zy62tdd6QBB FV9gw8s2lve5RsiNGyiCQETZyv7Wr/xhnhdi8GHE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 48A1D61215 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=jsanka@codeaurora.org From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Jeykumar Sankaran , narmstrong@baylibre.com, seanpaul@chromium.org, robdclark@gmail.com, jcrouse@codeaurora.org Subject: [PATCH] drm: add fb max width/height fields to drm_mode_config Date: Fri, 27 Sep 2019 18:31:24 -0700 Message-Id: <1569634284-14147-2-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1569634284-14147-1-git-send-email-jsanka@codeaurora.org> References: <1569634284-14147-1-git-send-email-jsanka@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mode_config max width/height values determine the maximum resolution the pixel reader can handle. But the same values are used to restrict the size of the framebuffer creation. Hardware's with scaling blocks can operate on framebuffers larger/smaller than that of the pixel reader resolutions by scaling them down/up before rendering. This changes adds a separate framebuffer max width/height fields in drm_mode_config to allow vendors to set if they are different than that of the default max resolution values. Vendors setting these fields should fix their mode_set paths too by filtering and validating the modes against the appropriate max fields in their mode_valid() implementations. Signed-off-by: Neil Armstrong Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/drm_framebuffer.c | 15 +++++++++++---- include/drm/drm_mode_config.h | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 5756431..2083168 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -300,14 +300,21 @@ struct drm_framebuffer * return ERR_PTR(-EINVAL); } - if ((config->min_width > r->width) || (r->width > config->max_width)) { + if ((config->min_width > r->width) || + (!config->max_fb_width && r->width > config->max_width) || + (config->max_fb_width && r->width > config->max_fb_width)) { DRM_DEBUG_KMS("bad framebuffer width %d, should be >= %d && <= %d\n", - r->width, config->min_width, config->max_width); + r->width, config->min_width, config->max_fb_width ? + config->max_fb_width : config->max_width); return ERR_PTR(-EINVAL); } - if ((config->min_height > r->height) || (r->height > config->max_height)) { + + if ((config->min_height > r->height) || + (!config->max_fb_height && r->height > config->max_height) || + (config->max_fb_height && r->height > config->max_fb_height)) { DRM_DEBUG_KMS("bad framebuffer height %d, should be >= %d && <= %d\n", - r->height, config->min_height, config->max_height); + r->height, config->min_height, config->max_fb_width ? + config->max_fb_height : config->max_height); return ERR_PTR(-EINVAL); } diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 3bcbe30..c6394ed 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -339,6 +339,8 @@ struct drm_mode_config_funcs { * @min_height: minimum fb pixel height on this device * @max_width: maximum fb pixel width on this device * @max_height: maximum fb pixel height on this device + * @max_fb_width: maximum fb buffer width if differs from max_width + * @max_fb_height: maximum fb buffer height if differs from max_height * @funcs: core driver provided mode setting functions * @fb_base: base address of the framebuffer * @poll_enabled: track polling support for this device @@ -523,6 +525,7 @@ struct drm_mode_config { int min_width, min_height; int max_width, max_height; + int max_fb_width, max_fb_height; const struct drm_mode_config_funcs *funcs; resource_size_t fb_base; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project 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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26D40C4360C for ; Sat, 28 Sep 2019 01:32:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9EFBF2146E for ; Sat, 28 Sep 2019 01:32:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MsHrPTSE"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="RI1nEsTN"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="gWltI+e8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EFBF2146E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JIVFIygT4Rq7fGx6X7lYkf5F/OAOEWdaw84I7JuGzAE=; b=MsHrPTSEGbDZcNvLOBnY5GWnob 0G4QiCAApq7UHrmfjePleH/vCstbGf5GAdPCgL/KLC4lHoaGEo8XkUMgEtD6+rUydtQjpToQCml5h BvR/BfYxMxQWPJdxhsKlSwZ4S2yCegonp9ieHV+jVy/U5ffXqrTxmUz8tr4mPsR5+0rOIr80THNnH xKfVMVBnsv1/9SwDi39M/8/GfaAaemSwFSgcS4o1rKSOPGppkSJq0xJPw24tvMDdpe+YUMONn/QHQ uYRpr24dtD0FGDjGUTHtCTobxFyOYrLtNXvJeaTPiXEyrytRAbaSYlnRL4P3KIfugZcYDWCNtzISe uF6d4/hg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iE1aV-0001TU-8i; Sat, 28 Sep 2019 01:31:55 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iE1aJ-0001Ih-AC for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2019 01:31:45 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DAD1D61359; Sat, 28 Sep 2019 01:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569634302; bh=m/+SNT1ylRadZlQdB8fVjW39Gd/vKBoLUGrjef6eP84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RI1nEsTNZgzuuIiAOrGLYL/LSzZo5ZrLPjkbmNFJa19OCzMGHHcOmzNKVY1pMs0nW N5AhgFKmeNw82wiejvI7iRs0Dzc8GAocncgMZDH/TeN4th64WONFI6Tgb1u+C02BoQ Szz76x0YTEX33TnwFjkO2hzh7zcDdA86cm1/oxw4= Received: from jeykumar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jsanka@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 48A1D61215; Sat, 28 Sep 2019 01:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569634300; bh=m/+SNT1ylRadZlQdB8fVjW39Gd/vKBoLUGrjef6eP84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWltI+e8ODxHtIEtclTtLsrsvPIs5a9B4Gwew/tlufCZvnw6SppeDSq0nMs/tFlje UFqToKo/LIIWRdNbhvAbgn6OzKFayULvC1QxqEbhX9fc0hVTCIAcDr2Zy62tdd6QBB FV9gw8s2lve5RsiNGyiCQETZyv7Wr/xhnhdi8GHE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 48A1D61215 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=jsanka@codeaurora.org From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] drm: add fb max width/height fields to drm_mode_config Date: Fri, 27 Sep 2019 18:31:24 -0700 Message-Id: <1569634284-14147-2-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1569634284-14147-1-git-send-email-jsanka@codeaurora.org> References: <1569634284-14147-1-git-send-email-jsanka@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190927_183143_421380_8B3EAA6E X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeykumar Sankaran , jcrouse@codeaurora.org, seanpaul@chromium.org, robdclark@gmail.com, narmstrong@baylibre.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The mode_config max width/height values determine the maximum resolution the pixel reader can handle. But the same values are used to restrict the size of the framebuffer creation. Hardware's with scaling blocks can operate on framebuffers larger/smaller than that of the pixel reader resolutions by scaling them down/up before rendering. This changes adds a separate framebuffer max width/height fields in drm_mode_config to allow vendors to set if they are different than that of the default max resolution values. Vendors setting these fields should fix their mode_set paths too by filtering and validating the modes against the appropriate max fields in their mode_valid() implementations. Signed-off-by: Neil Armstrong Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/drm_framebuffer.c | 15 +++++++++++---- include/drm/drm_mode_config.h | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 5756431..2083168 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -300,14 +300,21 @@ struct drm_framebuffer * return ERR_PTR(-EINVAL); } - if ((config->min_width > r->width) || (r->width > config->max_width)) { + if ((config->min_width > r->width) || + (!config->max_fb_width && r->width > config->max_width) || + (config->max_fb_width && r->width > config->max_fb_width)) { DRM_DEBUG_KMS("bad framebuffer width %d, should be >= %d && <= %d\n", - r->width, config->min_width, config->max_width); + r->width, config->min_width, config->max_fb_width ? + config->max_fb_width : config->max_width); return ERR_PTR(-EINVAL); } - if ((config->min_height > r->height) || (r->height > config->max_height)) { + + if ((config->min_height > r->height) || + (!config->max_fb_height && r->height > config->max_height) || + (config->max_fb_height && r->height > config->max_fb_height)) { DRM_DEBUG_KMS("bad framebuffer height %d, should be >= %d && <= %d\n", - r->height, config->min_height, config->max_height); + r->height, config->min_height, config->max_fb_width ? + config->max_fb_height : config->max_height); return ERR_PTR(-EINVAL); } diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 3bcbe30..c6394ed 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -339,6 +339,8 @@ struct drm_mode_config_funcs { * @min_height: minimum fb pixel height on this device * @max_width: maximum fb pixel width on this device * @max_height: maximum fb pixel height on this device + * @max_fb_width: maximum fb buffer width if differs from max_width + * @max_fb_height: maximum fb buffer height if differs from max_height * @funcs: core driver provided mode setting functions * @fb_base: base address of the framebuffer * @poll_enabled: track polling support for this device @@ -523,6 +525,7 @@ struct drm_mode_config { int min_width, min_height; int max_width, max_height; + int max_fb_width, max_fb_height; const struct drm_mode_config_funcs *funcs; resource_size_t fb_base; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeykumar Sankaran Subject: [PATCH] drm: add fb max width/height fields to drm_mode_config Date: Fri, 27 Sep 2019 18:31:24 -0700 Message-ID: <1569634284-14147-2-git-send-email-jsanka@codeaurora.org> References: <1569634284-14147-1-git-send-email-jsanka@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id B33386E116 for ; Sat, 28 Sep 2019 01:31:42 +0000 (UTC) In-Reply-To: <1569634284-14147-1-git-send-email-jsanka@codeaurora.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: seanpaul@chromium.org, narmstrong@baylibre.com List-Id: dri-devel@lists.freedesktop.org VGhlIG1vZGVfY29uZmlnIG1heCB3aWR0aC9oZWlnaHQgdmFsdWVzIGRldGVybWluZSB0aGUgbWF4 aW11bQpyZXNvbHV0aW9uIHRoZSBwaXhlbCByZWFkZXIgY2FuIGhhbmRsZS4gQnV0IHRoZSBzYW1l IHZhbHVlcyBhcmUKdXNlZCB0byByZXN0cmljdCB0aGUgc2l6ZSBvZiB0aGUgZnJhbWVidWZmZXIg Y3JlYXRpb24uIEhhcmR3YXJlJ3MKd2l0aCBzY2FsaW5nIGJsb2NrcyBjYW4gb3BlcmF0ZSBvbiBm cmFtZWJ1ZmZlcnMgbGFyZ2VyL3NtYWxsZXIgdGhhbgp0aGF0IG9mIHRoZSBwaXhlbCByZWFkZXIg cmVzb2x1dGlvbnMgYnkgc2NhbGluZyB0aGVtIGRvd24vdXAgYmVmb3JlCnJlbmRlcmluZy4KClRo aXMgY2hhbmdlcyBhZGRzIGEgc2VwYXJh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5jCkBAIC0zMDAsMTQgKzMwMCwyMSBAQCBzdHJ1Y3QgZHJtX2ZyYW1l YnVmZmVyICoKIAkJcmV0dXJuIEVSUl9QVFIoLUVJTlZBTCk7CiAJfQogCi0JaWYgKChjb25maWct Pm1pbl93aWR0aCA+IHItPndpZHRoKSB8fCAoci0+d2lkdGggPiBjb25maWctPm1heF93aWR0aCkp IHsKKwlpZiAoKGNvbmZpZy0+bWluX3dpZHRoID4gci0+d2lkdGgpIHx8CisJICAgICghY29uZmln LT5tYXhfZmJfd2lkdGggJiYgci0+d2lkdGggPiBjb25maWctPm1heF93aWR0aCkgfHwKKwkgICAg KGNvbmZpZy0+bWF4X2ZiX3dpZHRoICYmIHItPndpZHRoID4gY29uZmlnLT5tYXhfZmJfd2lkdGgp KSB7CiAJCURSTV9ERUJVR19LTVMoImJhZCBmcmFtZWJ1ZmZlciB3aWR0aCAlZCwgc2hvdWxkIGJl ID49ICVkICYmIDw9ICVkXG4iLAotCQkJICByLT53aWR0aCwgY29uZmlnLT5taW5fd2lkdGgsIGNv bmZpZy0+bWF4X3dpZHRoKTsKKwkJCXItPndpZHRoLCBjb25maWctPm1pbl93aWR0aCwgY29uZmln LT5tYXhfZmJfd2lkdGggPworCQkJY29uZmlnLT5tYXhfZmJfd2lkdGggOiBjb25maWctPm1heF93 aWR0aCk7CiAJCXJldHVybiBFUlJfUFRSKC1FSU5WQUwpOwogCX0KLQlpZiAoKGNvbmZpZy0+bWlu X2hlaWdodCA+IHItPmhlaWdodCkgfHwgKHItPmhlaWdodCA+IGNvbmZpZy0+bWF4X2hlaWdodCkp IHsKKworCWlmICgoY29uZmlnLT5taW5faGVpZ2h0ID4gci0+aGVpZ2h0KSB8fAorCSAgICAoIWNv bmZpZy0+bWF4X2ZiX2hlaWdodCAmJiByLT5oZWlnaHQgPiBjb25maWctPm1heF9oZWlnaHQpIHx8 CisJICAgIChjb25maWctPm1heF9mYl9oZWlnaHQgJiYgci0+aGVpZ2h0ID4gY29uZmlnLT5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