* [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry
@ 2020-06-11 12:55 Krishna Manikandan
2020-06-11 15:15 ` Rob Clark
2020-06-11 17:36 ` John Stultz
0 siblings, 2 replies; 3+ messages in thread
From: Krishna Manikandan @ 2020-06-11 12:55 UTC (permalink / raw)
To: dri-devel, linux-arm-msm, freedreno, devicetree
Cc: linux-kernel, abhinavk, dianders, seanpaul, Kalyan Thota, hoegsberg, mka
From: Kalyan Thota <kalyan_t@codeaurora.org>
Request for color processing blocks only if they are
available in the display hw catalog and they are
sufficient in number for the selection.
Signed-off-by: Kalyan Thota <kalyan_t@codeaurora.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 63976dc..9f8de77 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -521,7 +521,7 @@ static struct msm_display_topology dpu_encoder_get_topology(
struct dpu_kms *dpu_kms,
struct drm_display_mode *mode)
{
- struct msm_display_topology topology;
+ struct msm_display_topology topology = {0};
int i, intf_count = 0;
for (i = 0; i < MAX_PHYS_ENCODERS_PER_VIRTUAL; i++)
@@ -537,7 +537,8 @@ static struct msm_display_topology dpu_encoder_get_topology(
* 1 LM, 1 INTF
* 2 LM, 1 INTF (stream merge to support high resolution interfaces)
*
- * Adding color blocks only to primary interface
+ * Adding color blocks only to primary interface if available in
+ * sufficient number
*/
if (intf_count == 2)
topology.num_lm = 2;
@@ -546,8 +547,11 @@ static struct msm_display_topology dpu_encoder_get_topology(
else
topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1;
- if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI)
- topology.num_dspp = topology.num_lm;
+ if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI) {
+ if (dpu_kms->catalog->dspp &&
+ (dpu_kms->catalog->dspp_count >= topology.num_lm))
+ topology.num_dspp = topology.num_lm;
+ }
topology.num_enc = 0;
topology.num_intf = intf_count;
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry
2020-06-11 12:55 [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry Krishna Manikandan
@ 2020-06-11 15:15 ` Rob Clark
2020-06-11 17:36 ` John Stultz
1 sibling, 0 replies; 3+ messages in thread
From: Rob Clark @ 2020-06-11 15:15 UTC (permalink / raw)
To: Krishna Manikandan
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
linux-arm-msm, Linux Kernel Mailing List, dri-devel,
Douglas Anderson, Sean Paul, Abhinav Kumar, Kalyan Thota,
Kristian H. Kristensen, freedreno, Matthias Kaehlcke
On Thu, Jun 11, 2020 at 5:55 AM Krishna Manikandan
<mkrishn@codeaurora.org> wrote:
>
> From: Kalyan Thota <kalyan_t@codeaurora.org>
>
> Request for color processing blocks only if they are
> available in the display hw catalog and they are
> sufficient in number for the selection.
>
I believe this should have:
Fixes: e47616df008b ("drm/msm/dpu: add support for color processing
blocks in dpu driver")
> Signed-off-by: Kalyan Thota <kalyan_t@codeaurora.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> index 63976dc..9f8de77 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
> @@ -521,7 +521,7 @@ static struct msm_display_topology dpu_encoder_get_topology(
> struct dpu_kms *dpu_kms,
> struct drm_display_mode *mode)
> {
> - struct msm_display_topology topology;
> + struct msm_display_topology topology = {0};
> int i, intf_count = 0;
>
> for (i = 0; i < MAX_PHYS_ENCODERS_PER_VIRTUAL; i++)
> @@ -537,7 +537,8 @@ static struct msm_display_topology dpu_encoder_get_topology(
> * 1 LM, 1 INTF
> * 2 LM, 1 INTF (stream merge to support high resolution interfaces)
> *
> - * Adding color blocks only to primary interface
> + * Adding color blocks only to primary interface if available in
> + * sufficient number
> */
> if (intf_count == 2)
> topology.num_lm = 2;
> @@ -546,8 +547,11 @@ static struct msm_display_topology dpu_encoder_get_topology(
> else
> topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1;
>
> - if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI)
> - topology.num_dspp = topology.num_lm;
> + if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI) {
> + if (dpu_kms->catalog->dspp &&
> + (dpu_kms->catalog->dspp_count >= topology.num_lm))
> + topology.num_dspp = topology.num_lm;
> + }
>
> topology.num_enc = 0;
> topology.num_intf = intf_count;
> --
> 1.9.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry
2020-06-11 12:55 [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry Krishna Manikandan
2020-06-11 15:15 ` Rob Clark
@ 2020-06-11 17:36 ` John Stultz
1 sibling, 0 replies; 3+ messages in thread
From: John Stultz @ 2020-06-11 17:36 UTC (permalink / raw)
To: Krishna Manikandan
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
linux-arm-msm, lkml, dri-devel, Doug Anderson, Sean Paul,
abhinavk, Kalyan Thota, hoegsberg, freedreno, Matthias Kaehlcke
On Thu, Jun 11, 2020 at 5:55 AM Krishna Manikandan
<mkrishn@codeaurora.org> wrote:
>
> From: Kalyan Thota <kalyan_t@codeaurora.org>
>
> Request for color processing blocks only if they are
> available in the display hw catalog and they are
> sufficient in number for the selection.
>
> Signed-off-by: Kalyan Thota <kalyan_t@codeaurora.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Thanks so much for the quick fix!
-john
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-13 10:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 12:55 [v1] drm/msm/dpu: request for display color blocks based on hw catalog entry Krishna Manikandan
2020-06-11 15:15 ` Rob Clark
2020-06-11 17:36 ` John Stultz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).