From: Jani Nikula <jani.nikula@intel.com>
To: Colin Xu <Colin.Xu@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Update virtual PCH in single function
Date: Tue, 29 May 2018 08:45:30 +0300 [thread overview]
Message-ID: <87y3g36mmd.fsf@intel.com> (raw)
In-Reply-To: <957312d7-4630-51ec-33fa-825488fec708@intel.com>
On Wed, 30 May 2018, Colin Xu <Colin.Xu@intel.com> wrote:
> On 05/28/2018 09:42 PM, Jani Nikula wrote:
>> On Mon, 28 May 2018, Jani Nikula <jani.nikula@intel.com> wrote:
>>> On Mon, 28 May 2018, Jani Nikula <jani.nikula@intel.com> wrote:
>>>> On Tue, 29 May 2018, colin.xu@intel.com wrote:
>>>>> From: Colin Xu <colin.xu@intel.com>
>>>>>
>>>>> The existing way to update virtual PCH will return wrong PCH type
>>>>> in case the host doesn't have PCH:
>>>>> - intel_virt_detect_pch returns guessed PCH id 0
>>>>> - id 0 maps to PCH_NOP. >> should be PCH_NONE.
>>>>> Since PCH_NONE and PCH_NOP are different types, mixing them up
>>>>> will break vbt initialization logic.
>>>>>
>>>>> In addition, to add new none/nop PCH override for a specific
>>>>> platform, branching need to be added to intel_virt_detect_pch(),
>>>>> intel_pch_type() and the caller since none/nop PCH is not always
>>>>> mapping to the same predefined PCH id.
>>>>>
>>>>> This patch merges the virtual PCH update/sanity check logic into
>>>>> single function intel_virt_update_pch(), which still keeps using
>>>>> existing intel_pch_type() to do the sanity check, while making it
>>>>> clean to override virtual PCH id for a specific platform for future
>>>>> platform enablement.
>>>> Please keep the assignment out of intel_virt_{detect,update}_pch like. I
>>>> think the patch here is unnecessarily complicated.
>>> To elaborate, intel_pch_type() should *always* be able to map pch id to
>>> pch type. There should not be combinations that aren't covered by
>>> that. If the sanity checks there need to accept Broxton as well, perhaps
>>> pass a parameter to indicate virtualization, and accept certain pch ids
>>> for Broxton as well.
>>>
>>> If you're faking a pch for Broxton, I don't think there's a case where
>>> pch id should be 0 and pch type should be something else. Either both
>>> are zero, or both are non-zero.
>> -ENOCOFFEE in the morning. Is the fix you're looking for simply:
>
> Yes this is the most simply way.
> The reason I didn't craft the patch like this in the beginning is that
> I'm not sure after your refactoring patch, if the case exists that pch
> id 0 maps to type either nop or none.
> As you said there is no such case, the simply change should work well.
> Will you made the change sometime or I need update my patch set?
I was trying to look at which part of my refactoring broke this, but it
seems to me it was already setting pch_type to PCH_NOP before that.
Do you have a bisect result?
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-05-29 5:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 4:46 [PATCH 0/2] drm/i915: Fix incorrect virtual PCH_NONE/PCH_NOP assignment colin.xu
2018-05-28 4:46 ` [PATCH 2/2] drm/i915: Assign PCH_NONE for BXT in virtualization colin.xu
2018-05-28 4:46 ` [PATCH 1/2] drm/i915: Update virtual PCH in single function colin.xu
2018-05-28 9:37 ` Jani Nikula
2018-05-28 9:48 ` Jani Nikula
2018-05-28 13:42 ` Jani Nikula
2018-05-29 0:31 ` Colin Xu
2018-05-29 5:45 ` Jani Nikula [this message]
2018-05-29 6:20 ` Colin Xu
2018-05-31 3:10 ` Xu, Colin
2018-05-31 5:59 ` Jani Nikula
2018-05-28 5:12 ` ✓ Fi.CI.BAT: success for drm/i915: Fix incorrect virtual PCH_NONE/PCH_NOP assignment Patchwork
2018-05-28 6:02 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-28 13:40 ` ✗ Fi.CI.BAT: failure for drm/i915: Fix incorrect virtual PCH_NONE/PCH_NOP assignment (rev2) Patchwork
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=87y3g36mmd.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=Colin.Xu@intel.com \
--cc=intel-gfx@lists.freedesktop.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.