From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Cc: airlied@linux.ie, liviu.dudau@arm.com,
dri-devel@lists.freedesktop.org, malidp@foss.arm.com, nd@arm.com
Subject: Re: [PATCH] drm: mali-dp: Set encoder possible_clones
Date: Thu, 12 Jul 2018 15:37:36 +0300 [thread overview]
Message-ID: <20180712123736.GY5565@intel.com> (raw)
In-Reply-To: <1531385336-17418-1-git-send-email-alexandru-cosmin.gheorghe@arm.com>
On Thu, Jul 12, 2018 at 09:48:56AM +0100, Alexandru Gheorghe wrote:
> Set possible_clones field to report that the writeback connector and
> the one driving the display could be enabled at the same time.
>
> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
> ---
> drivers/gpu/drm/arm/malidp_drv.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> index 5b72605..3664da9 100644
> --- a/drivers/gpu/drm/arm/malidp_drv.c
> +++ b/drivers/gpu/drm/arm/malidp_drv.c
> @@ -616,6 +616,8 @@ static int malidp_bind(struct device *dev)
> struct malidp_hw_device *hwdev;
> struct platform_device *pdev = to_platform_device(dev);
> struct of_device_id const *dev_id;
> + struct drm_encoder *encoder;
> + int num_encoders = 0;
> /* number of lines for the R, G and B output */
> u8 output_width[MAX_OUTPUT_CHANNELS];
> int ret = 0, i;
> @@ -737,6 +739,14 @@ static int malidp_bind(struct device *dev)
> goto bind_fail;
> }
>
> + list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
> + num_encoders++;
> + }
dev->mode_config.num_encoder ?
> +
> + list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) {
> + encoder->possible_clones = (1 << num_encoders) - 1;
> + }
Your commit message speaks only about two specific encoders but here
you're claiming any encoder can be cloned with any other. I can't
actually figure out how many encoders there can be because the encoder
registration seems to happen by magic means. Some explanation would
be nice.
I'm interested because I'd like to clean up the possible_clones stuff
to actually reflect reality so that userspace could actually use that
information for something. See
https://patchwork.freedesktop.org/series/44849/
> +
> ret = malidp_irq_init(pdev);
> if (ret < 0)
> goto irq_init_fail;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-07-12 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 8:48 [PATCH] drm: mali-dp: Set encoder possible_clones Alexandru Gheorghe
2018-07-12 12:37 ` Ville Syrjälä [this message]
2018-07-12 12:54 ` Alexandru-Cosmin Gheorghe
2018-07-12 13:10 ` Ville Syrjälä
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=20180712123736.GY5565@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=alexandru-cosmin.gheorghe@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=liviu.dudau@arm.com \
--cc=malidp@foss.arm.com \
--cc=nd@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).