From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Kuogee Hsieh <quic_khsieh@quicinc.com>,
dri-devel@lists.freedesktop.org, robdclark@gmail.com,
sean@poorly.run, swboyd@chromium.org, vkoul@kernel.org,
daniel@ffwll.ch, airlied@linux.ie, agross@kernel.org,
bjorn.andersson@linaro.org
Cc: quic_abhinavk@quicinc.com, quic_aravindh@quicinc.com,
quic_sbillaka@quicinc.com, freedreno@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] drm/msm/dp: revise timing engine programming to support compression (DSC)
Date: Sat, 5 Feb 2022 00:35:48 +0300 [thread overview]
Message-ID: <859ff316-de11-e1a3-a714-addd7a490eb0@linaro.org> (raw)
In-Reply-To: <1643999801-20359-3-git-send-email-quic_khsieh@quicinc.com>
On 04/02/2022 21:36, Kuogee Hsieh wrote:
> Divides horizontal width by 3 at timing engine of interface. There are
> major part of compression (DSC) programming have to be done at DSC
> controller which is not covered by this patch.
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 22 ++++++++++++++++++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 3 +++
> 2 files changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
> index 35d4aaa..ee7ca34 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
> @@ -128,7 +128,7 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
> * video timing. It is recommended to enable it for all cases, except
> * if compression is enabled in 1 pixel per clock mode
> */
> - if (p->wide_bus_en)
> + if (!p->compression_en || p->wide_bus_en)
> intf_cfg2 |= BIT(4);
So, what exactly is BIT(4)? Is it WIDE_BUS_ENABLE of some kind? Then why
do you disable it for compression_en?
Please, add defines for all the respective BIT(n) values.
>
> if (p->wide_bus_en)
> @@ -150,10 +150,16 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
> */
> data_width = p->width;
>
> - if (!dp_intf && p->wide_bus_en)
> + if (p->compression_en) {
> + data_width = DIV_ROUND_UP(p->dce_bytes_per_line, 3);
> +
> + if (p->wide_bus_en)
> + data_width >>= 1;
> + } else if (!dp_intf && p->wide_bus_en) {
> data_width = p->width >> 1;
> - else
> + } else {
> data_width = p->width;
> + }
>
> hsync_data_start_x = hsync_start_x;
> hsync_data_end_x = hsync_start_x + data_width - 1;
> @@ -178,8 +184,16 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx,
>
> active_hctl = (active_h_end << 16) | active_h_start;
>
> - if (dp_intf)
> + if (dp_intf) {
> display_hctl = active_hctl;
> + if (p->compression_en) {
> + active_data_hctl = (hsync_start_x +
> + p->extra_dto_cycles) << 16;
> + active_data_hctl += hsync_start_x;
> +
> + display_data_hctl = active_data_hctl;
> + }
> + }
>
> den_polarity = 0;
> if (ctx->cap->type == INTF_HDMI) {
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
> index e4a518a..8fc71ce 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h
> @@ -32,6 +32,9 @@ struct intf_timing_params {
> u32 hsync_skew;
>
> bool wide_bus_en;
> + bool compression_en;
> + u32 extra_dto_cycles; /* for DP only */
> + u32 dce_bytes_per_line;
> };
>
> struct intf_prog_fetch {
--
With best wishes
Dmitry
next prev parent reply other threads:[~2022-02-04 21:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 18:36 [PATCH v3 0/3] enable widebus feature base on chip hardware revision Kuogee Hsieh
2022-02-04 18:36 ` [PATCH v3 1/3] drm/msm/dp: revise timing engine programming to support widebus feature Kuogee Hsieh
2022-02-04 21:33 ` Dmitry Baryshkov
2022-02-04 22:05 ` Dmitry Baryshkov
2022-02-04 23:26 ` Kuogee Hsieh
2022-02-04 23:39 ` Dmitry Baryshkov
2022-02-04 18:36 ` [PATCH v3 2/3] drm/msm/dp: revise timing engine programming to support compression (DSC) Kuogee Hsieh
2022-02-04 21:35 ` Dmitry Baryshkov [this message]
2022-02-04 18:36 ` [PATCH v3 3/3] drm/msm/dp: enable widebus feature for display port Kuogee Hsieh
2022-02-04 21:27 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=859ff316-de11-e1a3-a714-addd7a490eb0@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_aravindh@quicinc.com \
--cc=quic_khsieh@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®