Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Jessica Zhang <quic_jesszhan@quicinc.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	<freedreno@lists.freedesktop.org>
Cc: <linux-arm-msm@vger.kernel.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	<dri-devel@lists.freedesktop.org>,
	Kuogee Hsieh <quic_khsieh@quicinc.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Sean Paul <sean@poorly.run>
Subject: Re: [PATCH v12 1/9] drm/display/dsc: Add flatness and initial scale value calculations
Date: Mon, 22 May 2023 14:15:15 -0700	[thread overview]
Message-ID: <7e28afab-c717-bcd1-fd5b-ff64e81eca27@quicinc.com> (raw)
In-Reply-To: <875y8kogfd.fsf@intel.com>



On 5/22/2023 2:37 AM, Jani Nikula wrote:
> On Wed, 17 May 2023, Jessica Zhang <quic_jesszhan@quicinc.com> wrote:
>> Add helpers to calculate det_thresh_flatness and initial_scale_value as
>> these calculations are defined within the DSC spec.
>>
>> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
>> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>> ---
>>   include/drm/display/drm_dsc_helper.h | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/include/drm/display/drm_dsc_helper.h b/include/drm/display/drm_dsc_helper.h
>> index fc2104415dcb..753b0034eda7 100644
>> --- a/include/drm/display/drm_dsc_helper.h
>> +++ b/include/drm/display/drm_dsc_helper.h
>> @@ -25,5 +25,15 @@ void drm_dsc_set_rc_buf_thresh(struct drm_dsc_config *vdsc_cfg);
>>   int drm_dsc_setup_rc_params(struct drm_dsc_config *vdsc_cfg, enum drm_dsc_params_type type);
>>   int drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg);
>>   
>> +static inline u8 drm_dsc_initial_scale_value(const struct drm_dsc_config *dsc)
>> +{
>> +	return 8 * dsc->rc_model_size / (dsc->rc_model_size - dsc->initial_offset);
>> +}
>> +
>> +static inline u32 drm_dsc_flatness_det_thresh(const struct drm_dsc_config *dsc)
>> +{
>> +	return 2 << (dsc->bits_per_component - 8);
>> +}
> 
> kernel-doc?

Hi Jani,

Sure, I'll add kernel docs for these.

> Maybe make them regular functions instead of static inline?

I was under the impression that smaller/single-line functions were good 
candidates for inlining. However, if you have a strong preference for 
having these as regular functions, I'm ok with that too.

Thanks,

Jessica Zhang

> 
> BR,
> Jani.
> 
>> +
>>   #endif /* _DRM_DSC_HELPER_H_ */
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-05-22 21:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 22:27 [PATCH v12 0/9] Introduce MSM-specific DSC helpers Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 1/9] drm/display/dsc: Add flatness and initial scale value calculations Jessica Zhang
2023-05-18  0:37   ` Dmitry Baryshkov
2023-05-22  9:37   ` Jani Nikula
2023-05-22 21:15     ` Jessica Zhang [this message]
2023-05-17 22:27 ` [PATCH v12 2/9] drm/display/dsc: add helper to set semi-const parameters Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 3/9] drm/display/dsc: Add drm_dsc_get_bpp_int helper Jessica Zhang
2023-05-18  0:38   ` Dmitry Baryshkov
2023-05-22  9:35   ` Jani Nikula
2023-05-22 21:16     ` Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 4/9] drm/msm/dsi: use DRM DSC helpers for DSC setup Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 5/9] drm/msm: Add MSM-specific DSC helper methods Jessica Zhang
2023-05-17 23:01   ` Marijn Suijten
2023-05-18  0:26     ` Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 6/9] drm/msm/dpu: Use fixed DRM DSC helper for det_thresh_flatness Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 7/9] drm/msm/dpu: Fix slice_last_group_size calculation Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 8/9] drm/msm/dsi: Use MSM and DRM DSC helper methods Jessica Zhang
2023-05-17 22:27 ` [PATCH v12 9/9] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup Jessica Zhang

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=7e28afab-c717-bcd1-fd5b-ff64e81eca27@quicinc.com \
    --to=quic_jesszhan@quicinc.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=sean@poorly.run \
    /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