From: Nathan Schulte <nmschulte@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
xorg@lists.x.org, intel-gfx@lists.freedesktop.org
Subject: Re: RandR + i915 (HD 4600 / Haswell) -- Cannot switch from internal to 3x external
Date: Wed, 17 Jun 2015 09:56:08 -0500 [thread overview]
Message-ID: <55818A88.90800@gmail.com> (raw)
In-Reply-To: <20150617091349.GC24012@nuc-i3427.alporthouse.com>
On 06/17/2015 04:13 AM, Chris Wilson wrote:
> On Wed, Jun 17, 2015 at 09:46:25AM +0100, Chris Wilson wrote:
>> I think this is the right fix:
>>
>> diff --git a/xrandr.c b/xrandr.c
>> index fbfd93e..c0feac3 100644
>> --- a/xrandr.c
>> +++ b/xrandr.c
>> @@ -3029,7 +3029,7 @@ main (int argc, char **argv)
>> if (!config_output) argerr ("%s must be used after --output\n", argv[i]);
>> set_name_xid (&config_output->mode, None);
>> set_name_xid (&config_output->crtc, None);
>> - config_output->changes |= changes_mode;
>> + config_output->changes |= changes_mode | changes_crtc;
>> continue;
>> }
>> if (!strcmp ("--fb", argv[i])) {
>
> Though there is still this logic in check_crtc_for_output:
>
> if (crtc->notput) { // check we can clone in our configuration
> ...
> } else if (crtc->crtc_info->noutput) { // check against old
> }
>
> But we never ignore the old configuration when we disable all the
> outputs on it. So to avoid running out of CRTC prematurely, we also need
> to stop considering the old configuration like:
>
> diff --git a/xrandr.c b/xrandr.c
> index c0feac3..181c76e 100644
> --- a/xrandr.c
> +++ b/xrandr.c
> @@ -2243,6 +2243,8 @@ static void
> pick_crtcs (void)
> {
> output_t *output;
> + int saved_crtc_noutput[num_crtcs];
> + int n;
>
> /*
> * First try to match up newly enabled outputs with spare crtcs
> @@ -2274,7 +2276,18 @@ pick_crtcs (void)
> */
> for (output = all_outputs; output; output = output->next)
> output->current_crtc_info = output->crtc_info;
> +
> + /* Mark all CRTC as currently unused */
> + for (n = 0; n < num_crtcs; n++) {
> + saved_crtc_noutput[n] = crtcs[n].crtc_info->noutput;
> + crtcs[n].crtc_info->noutput = 0;
> + }
> +
> pick_crtcs_score (all_outputs);
> +
> + for (n = 0; n < num_crtcs; n++)
> + crtcs[n].crtc_info->noutput = saved_crtc_noutput[n];
> +
> for (output = all_outputs; output; output = output->next)
> {
> if (output->mode_info && !output->crtc_info)
I'll give these two patches a try and report back.
Thanks,
--
Nate
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-17 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 15:40 RandR + i915 (HD 4600 / Haswell) -- Cannot switch from internal to 3x external Nathan Schulte
2015-06-17 8:46 ` Chris Wilson
2015-06-17 9:13 ` Chris Wilson
2015-06-17 14:56 ` Nathan Schulte [this message]
2015-06-17 18:05 ` Nathan Schulte
2015-06-17 20:26 ` Chris Wilson
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=55818A88.90800@gmail.com \
--to=nmschulte@gmail.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=xorg@lists.x.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.