Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14791961ybl; Mon, 30 Dec 2019 17:27:09 -0800 (PST) X-Google-Smtp-Source: APXvYqz4phAhBSQk+WwW1ANEdMZA+dIssXJnoW0U59/ysUVGaHZBGyXBbFsXsv+lMVRXWIwlywsC X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr73647326otr.167.1577755629354; Mon, 30 Dec 2019 17:27:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577755629; cv=none; d=google.com; s=arc-20160816; b=aKebLCZ7KIrYh0r4Te0w7n7B/ktl54ZaQFdTWjpuVCszMdZ/iUZrqKULOtX26oKkcz m9a0vVZ7evJtWfkzOPQsPK80SLUIx2Kl6cWCbOYOoKFxUbbvfOzWT/IL6es7MjLFMBva p/SmtFqVIkhZaYPVk/5QvW2jei9LYbFWp0nto6OprKbXFw9wUiBdUGWYB7XTe4VL/JQi JwKHOoZYgmI9ZXDfKFFempBkCu4gLa90AsmLnccPgRrSc79WQbqsz1zBhffaWEy4hbIU vpyjj+r36ubkWYOzXUmy6cbpr6vfSsaZU8ixFu2s2nr8/Az0o7tEfK9Xp76IUXqFgElY 8nZQ== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=nE/6/pb9k1mrvDXQ5a/ykRLvdYft4DqA4eNJ4QTv6g0=; b=Vd28haBlfao//NUBildo0qrSdQLji3PavXokoKlAgRweOFEUHjIbECZI6/+JkWMp1S Rv2CbtOrlVl7oBy3IOpbiSgL35EY9foJXRj4IPPKj/1x8YFaMhm5lunW5MIQ6PTQSNIe ssyGq6HvnLjuJiM57KskhBvHLjsAtw/KxKIrJZKJh2HkER7Qcx49hWsyzciCrvv4qLIR iWmYQJuR7SHo+EC9VkMUHmE4bfIfh7QETBG0rchJt/G711WxZAo7A24DpfOJ7O7eGHrI RogqBDSKuQAYOc/lbssHfFE0WLDsyW45uoK7RcNr+ek7F542pRBie5XWHCbgyX/rRO/V /lVw== ARC-Authentication-Results: i=1; mx.google.com; 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 t15si20095006oij.189.2019.12.30.17.26.57; Mon, 30 Dec 2019 17:27:09 -0800 (PST) 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; 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 S1727840AbfLaB0F (ORCPT + 99 others); Mon, 30 Dec 2019 20:26:05 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:8650 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727804AbfLaB0F (ORCPT ); Mon, 30 Dec 2019 20:26:05 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 971E09AEA5D8655BBE85; Tue, 31 Dec 2019 09:26:02 +0800 (CST) Received: from [127.0.0.1] (10.57.60.129) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Tue, 31 Dec 2019 09:25:55 +0800 Subject: Re: [PATCH] drm/hisilicon: Added three new resolutions and changed the alignment to 128 Bytes To: Daniel Stone , Tian Tao CC: Chen Feng , David Airlie , Daniel Vetter , , Gerd Hoffmann , Alex Deucher , , dri-devel , "Xinliang Liu" , Linux Kernel Mailing List , References: <1577495680-28766-1-git-send-email-tiantao6@hisilicon.com> From: "tiantao (H)" Message-ID: <45055b17-041c-f726-6c5d-5769c96b92d9@huawei.com> Date: Tue, 31 Dec 2019 09:25:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.57.60.129] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel: Thanks you very much ,I will follow your suggestion to split this to three patches. Best 在 2019/12/30 18:23, Daniel Stone 写道: > Hi Tian, > > On Sat, 28 Dec 2019 at 01:14, Tian Tao wrote: >> @@ -118,11 +119,9 @@ static void hibmc_plane_atomic_update(struct drm_plane *plane, >> writel(gpu_addr, priv->mmio + HIBMC_CRT_FB_ADDRESS); >> >> reg = state->fb->width * (state->fb->format->cpp[0]); >> - /* now line_pad is 16 */ >> - reg = PADDING(16, reg); >> >> line_l = state->fb->width * state->fb->format->cpp[0]; >> - line_l = PADDING(16, line_l); >> + line_l = PADDING(128, line_l); > > The 'line length' here is the 'stride' field of the FB. Stride is set > by userspace when allocating the buffer, and the kernel must not > attempt to guess what userspace set. > > You should use state->fb->strides[0] directly here, and in your > atomic_check() function, make sure that the framebuffer stride is > correctly aligned. > > Please split this into a separate change. Your commit has three > changes in it, which should all be separate commits: > * enforce 128-byte stride alignment (is this a hardware limit?) > * get the BO from drm_fb rather than hibmc_fb (can hibmc_fb->obj > just be removed now?) > * add new clock/resolution configurations > > Cheers, > Daniel > > . >