John Stultz
651e4769ba
drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally
...
In chasing down issues with EDID probing, I found some
duplicated but incomplete logic used to power the chip on and
off.
This patch refactors the adv7511_power_on/off functions, so
they can be used for internal needs.
Cc: David Airlie <airlied@linux.ie >
Cc: Archit Taneja <architt@codeaurora.org >
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-5-git-send-email-john.stultz@linaro.org
2017-01-19 09:07:03 +05:30
Archit Taneja
40d86d2d22
drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection
...
On some adv7511 implementations, we can get some spurious
disconnect signals which can cause monitor probing to fail.
This patch enables HPD (hot plug detect) interrupt support
which allows the monitor to be properly re-initialized when
the spurious disconnect signal goes away.
This also enables proper hotplug support.
Cc: David Airlie <airlied@linux.ie >
Cc: Archit Taneja <architt@codeaurora.org >
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: dri-devel@lists.freedesktop.org
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Originally-by: Archit Taneja <architt@codeaurora.org >
[jstultz: Added proper commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-4-git-send-email-john.stultz@linaro.org
2017-01-19 09:06:14 +05:30
John Stultz
6d5104c5a6
drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event()
...
In chasing down a previous issue with EDID probing from calling
drm_helper_hpd_irq_event() from irq context, Laurent noticed
that the DRM documentation suggests that
drm_kms_helper_hotplug_event() should be used instead.
Thus this patch replaces drm_helper_hpd_irq_event() with
drm_kms_helper_hotplug_event(), which requires we update the
connector.status entry and only call _hotplug_event() when the
status changes.
Cc: David Airlie <airlied@linux.ie >
Cc: Archit Taneja <architt@codeaurora.org >
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-3-git-send-email-john.stultz@linaro.org
2017-01-19 09:05:24 +05:30
John Stultz
518cb7057a
drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context
...
I was recently seeing issues with EDID probing, where
the logic to wait for the EDID read bit to be set by the
IRQ wasn't happening and the code would time out and fail.
Digging deeper, I found this was due to the fact that
IRQs were disabled as we were running in IRQ context from
the HPD signal.
Thus this patch changes the logic to handle the HPD signal
via a work_struct so we can be out of irq context.
With this patch, the EDID probing on hotplug does not time
out.
Cc: David Airlie <airlied@linux.ie >
Cc: Archit Taneja <architt@codeaurora.org >
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com >
Cc: Lars-Peter Clausen <lars@metafoo.de >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: John Stultz <john.stultz@linaro.org >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-2-git-send-email-john.stultz@linaro.org
2017-01-19 09:04:39 +05:30
Ville Syrjälä
3bfdfdcbce
drm/i915: Ignore bogus plane coordinates on SKL when the plane is not visible
...
When the plane is invisible we may have all sorts of bogus stuff
in the coordinates, which we must ignore or else we might fail the
plane update. This started to happen on SKL when I moved the plane
offset computation to happen in the check phase. Previously we
happily ignored it all since we never called the update_plane hook
with an invisible plane.
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com >
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: b63a16f6cd
("drm/i915: Compute display surface offset in the plane check hook for SKL+")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98258
Testcase: igt/pm_rpm/legacy-planes
Testcase: igt/pm_rpm/universal-planes
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-3-git-send-email-ville.syrjala@linux.intel.com
(cherry picked from commit a5e4c7d0aa
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-18 16:31:25 +02:00
Francisco Jerez
4fc020d864
drm/i915: Remove WaDisableLSQCROPERFforOCL KBL workaround.
...
The WaDisableLSQCROPERFforOCL workaround has the side effect of
disabling an L3SQ optimization that has huge performance implications
and is unlikely to be necessary for the correct functioning of usual
graphic workloads. Userspace is free to re-enable the workaround on
demand, and is generally in a better position to determine whether the
workaround is necessary than the DRM is (e.g. only during the
execution of compute kernels that rely on both L3 fences and HDC R/W
requests).
The same workaround seems to apply to BDW (at least to production
stepping G1) and SKL as well (the internal workaround database claims
that it does for all steppings, while the BSpec workaround table only
mentions pre-production steppings), but the DRM doesn't do anything
beyond whitelisting the L3SQCREG4 register so userspace can enable it
when it sees fit. Do the same on KBL platforms.
Improves performance of the GFXBench4 gl_manhattan31 benchmark by 60%,
and gl_4 (AKA car chase) by 14% on a KBL GT2 running Mesa master --
This is followed by a regression of 35% and 10% respectively for the
same benchmarks and platform caused by my recent patch series
switching userspace to use the dataport constant cache instead of the
sampler to implement uniform pull constant loads, which caused us to
hit more heavily the L3 cache (and on platforms other than KBL had the
opposite effect of improving performance of the same two benchmarks).
The overall effect on KBL of this change combined with the recent
userspace change is respectively 4.6% and 2.6%. SynMark2 OglShMapPcf
was affected by the constant cache changes (though it improved as it
did on other platforms rather than regressing), but is not
significantly affected by this patch (with statistical significance of
5% and sample size 20).
v2: Drop some more code to avoid unused variable warning.
Fixes: 738fa1b312
("drm/i915/kbl: Add WaDisableLSQCROPERFforOCL")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99256
Signed-off-by: Francisco Jerez <currojerez@riseup.net >
Cc: Matthew Auld <matthew.william.auld@gmail.com >
Cc: Eero Tamminen <eero.t.tamminen@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: beignet@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v4.7+
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
[Removed double Fixes tag]
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484217894-20505-1-git-send-email-mika.kuoppala@intel.com
(cherry picked from commit 8726f2faa3
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-18 16:31:11 +02:00
Shawn Guo
c77b9abf3c
drm: vc4: use crtc helper drm_crtc_from_index()
...
Use drm_crtc_from_index() to find drm_crtc for given index, so that we
do not need to maintain a pointer array in struct vc4_dev.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-7-git-send-email-shawnguo@kernel.org
2017-01-18 09:21:13 -05:00
Shawn Guo
75bcb0545b
drm: tegra: use crtc helper drm_crtc_from_index()
...
Function tegra_crtc_from_pipe() does the exactly same thing as what
crtc helper drm_crtc_from_index() provides. Use the helper to save
some code.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Thierry Reding <thierry.reding@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-6-git-send-email-shawnguo@kernel.org
2017-01-18 09:21:10 -05:00
Shawn Guo
ea441bd33f
drm: nouveau: use crtc helper drm_crtc_from_index()
...
Use drm_crtc_from_index() to find drm_crtc for given index.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-5-git-send-email-shawnguo@kernel.org
2017-01-18 09:21:06 -05:00
Shawn Guo
ffec892583
drm: mediatek: use crtc helper drm_crtc_from_index()
...
Use drm_crtc_from_index() to find drm_crtc for given index, so that we
do not need to maintain a pointer array in struct mtk_drm_private.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: CK Hu <ck.hu@mediatek.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-4-git-send-email-shawnguo@kernel.org
2017-01-18 09:21:06 -05:00
Shawn Guo
b8bf6836bf
drm: kirin: use crtc helper drm_crtc_from_index()
...
Use drm_crtc_from_index() to find drm_crtc for given index, so that we
do not need to maintain a pointer array in struct kirin_drm_private.
Reviewed-by: Xinliang Liu<z.liuxinliang@hisilicon.com >
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-3-git-send-email-shawnguo@kernel.org
2017-01-18 09:19:56 -05:00
Shawn Guo
a3c764e988
drm: exynos: use crtc helper drm_crtc_from_index()
...
Use drm_crtc_from_index() to find drm_crtc for given index, so that we
do not need to maintain a pointer array in struct exynos_drm_private.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Inki Dae <inki.dae@samsung.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1483961145-18453-2-git-send-email-shawnguo@kernel.org
2017-01-18 08:56:59 -05:00
Ander Conselvan de Oliveira
1e5a15d65d
drm/i915: Avoid drm_atomic_state_put(NULL) on error paths
...
The error paths in hsw_trans_edp_pipe_A_crc_wa() and
intel_prepare_reset() would potentially call drm_atomic_state_put with a
NULL state, which would lead to a NULL pointer dereference.
Found by coverity.
v2: Improve the error paths. (Chris)
Fixes: 0853695c3b
("drm: Add reference counting to drm_atomic_state")
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484742868-9551-1-git-send-email-ander.conselvan.de.oliveira@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-01-18 13:47:22 +00:00
Chris Wilson
3c5e37f169
drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume
...
intel_display_resume() may be called without an atomic state to restore,
i.e. dev_priv->modeset_reset_restore state is NULL. One such case is
following a lid open/close event and the forced modeset in
intel_lid_notify().
Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com >
Tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com >
Fixes: 0853695c3b
("drm: Add reference counting to drm_atomic_state")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20170115125825.18597-1-chris@chris-wilson.co.uk
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
2017-01-18 11:40:01 +00:00
Mika Kuoppala
71895a0858
drm/i915: Add comment how we treat hung contexts
...
Explain in a comment how and why we treat hung context like we do.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-7-git-send-email-mika.kuoppala@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-01-18 10:47:32 +00:00
Chris Wilson
0e178aef8f
drm/i915: Detect a failed GPU reset+recovery
...
If we can't recover the GPU after the reset, mark it as wedged to cancel
the outstanding tasks and to prevent new users from trying to use the
broken GPU.
v2: Check the same ring is hung again before declaring the reset broken.
v3: use engine_stalled (Mika)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-6-git-send-email-mika.kuoppala@intel.com
2017-01-18 10:47:26 +00:00
Mika Kuoppala
61da536204
drm/i915: Tidy up engine reset logic
...
Split engine reset for engine and request specific parts.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-5-git-send-email-mika.kuoppala@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-01-18 10:44:51 +00:00
Mika Kuoppala
bf2f04366c
drm/i915: Introduce engine_stalled helper
...
Move the engine stalled/pardoned check into a helper function.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-4-git-send-email-mika.kuoppala@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-01-18 10:44:50 +00:00
Mika Kuoppala
211b12afe6
drm/i915: Cleanup request skip decision
...
Since we now only skip banned contexts, preventing the skip of default
contexts is no longer sensible. For a similar argument as before
'commit 7ec73b7e36
("drm/i915: Only skip requests once a context is banned")'
we end up with an inconsistent API if we only mark future execbufs from
the default ctx as banned but fail to mark those currently executing
as failed.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-3-git-send-email-mika.kuoppala@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-01-18 10:44:50 +00:00
Mika Kuoppala
36193acd54
drm/i915: Introduce engine_skip_context
...
Add a new function for skipping all pending requests
for a context in order to make engine reset flow more
readable.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-2-git-send-email-mika.kuoppala@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-01-18 10:44:47 +00:00
Chris Wilson
4c96554365
drm/i915: Move engine reset preparation to i915_gem_reset_prepare()
...
Now that we have prepare/finish routines for the GEM reset, move the
disabling of the engine->irq_tasklet into them to reduce repetition. The
device irq enable/disable is split out to ensure it is run first and
last always (even if the GPU reset fails).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484668747-9120-1-git-send-email-mika.kuoppala@intel.com
2017-01-18 10:44:20 +00:00
Chris Wilson
77affa3172
drm/i915/psr: Fix compiler warnings for hsw_psr_disable()
...
drivers/gpu/drm/i915/intel_psr.c:634 hsw_psr_disable() warn: if statement not indented
drivers/gpu/drm/i915/intel_psr.c:644 hsw_psr_disable() warn: if statement not indented
Fixes: 3fcb0ca1d8
("drm/i915/psr: fix blank screen issue for psr2")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Jim Bride <jim.bride@linux.intel.com >
Cc: Vathsala Nagaraju <vathsala.nagaraju@intel.com >
Cc: Patil Deepti <deepti.patil@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170116130622.20369-2-chris@chris-wilson.co.uk
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-01-18 10:25:01 +00:00
Chris Wilson
b86bef20e0
drm/i915: Fix compiler warnings for i915_edp_psr_status()
...
Appease both the poor reader and the compiler by rewriting the string
lookup for EDP_PSR2_STATUS_CTL:
drivers/gpu/drm/i915/i915_debugfs.c:2662 i915_edp_psr_status() warn: if statement not indented
Fixes: 6ba1f9e177
("drm/i915/psr: report live PSR2 State")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Jim Bride <jim.bride@linux.intel.com >
Cc: Vathsala Nagaraju <vathsala.nagaraju@intel.com >
Cc: Patil Deepti <deepti.patil@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170116130622.20369-1-chris@chris-wilson.co.uk
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2017-01-18 10:24:10 +00:00
Anusha Srivatsa
fbbad73e1b
drm/i915/huc: Unified css_header struct for GuC and HuC
...
HuC firmware css header has almost exactly same definition as GuC
firmware except for the sw_version. Also, add a new member fw_type
into intel_uc_fw to indicate what kind of fw it is. So, the loader
will pull right sw_version from header.
v2: rebased on-top of drm-intel-nightly
v3: rebased. Rename device_id to guc_branch_client_version,
make guc_sw_version a union. <Jeff Mcgee>. Put UC_FW_TYPE_GUC
and UC_FW_TYPE_HUC into an enum.
v4: rebased on top of drm-tip.Update dev to dev_priv in
intel_uc_fw_fetch.
v5: rebased. Add INTEL_ prefix to an enum. Add fw_type declaration
from patch 1.Combine two different unions for huc and guc version,
reserved etc into one union with two structs.
v6: rebased. Change fw_type to enum.
v7: rebased. Rename the enum fw_type to intel_uc_fw_type.
Cc: Michal Wajdeczko <michal.wajdeczko.@intel.com >
Tested-by: Xiang Haihao <haihao.xiang@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Alex Dai <yu.dai@intel.com >
Signed-off-by: Peter Antoine <peter.antoine@intel.com >
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484356631-16139-3-git-send-email-anusha.srivatsa@intel.com
2017-01-18 11:50:43 +02:00
Anusha Srivatsa
db0a091bcd
drm/i915/guc: Make the GuC fw loading helper functions general
...
Rename some of the GuC fw loading code to make them more general. We
will utilise them for HuC loading as well.
s/intel_guc_fw/intel_uc_fw/g
s/GUC_FIRMWARE/INTEL_UC_FIRMWARE/g
Struct intel_guc_fw is renamed to intel_uc_fw. Prefix of tts members,
such as 'guc' or 'guc_fw' either is renamed to 'uc' or removed for
same purpose.
v2: rebased on top of nightly.
reapplied the search/replace as upstream code as changed.
v3: removed G from messages in shared fw fetch function.
v4: rebased.Updated dev to dev_priv in intel_guc_setup(), guc_fw_getch()
and intel_guc_init().
v5: rebased. Remove uint32_t fw_type to patch 2. Add INTEL_ prefix for
fields in enum intel_uc_fw_status. Remove uc_dev field since its never
used.Rename uc_fw to just fw and guc_fw to fw to avoid redundency.
v6: rebased. Remove sections of code that were commented and no longer
required.
v7: rebased. Remove uc_fw_ prefix from path and obj fields
in intel_uc_fw struct as suggested by Michal.
v8: rebased. Add declaration of intel_guc_wopcm_size() in
this patch instead of patch 3.
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com >
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Alex Dai <yu.dai@intel.com >
Signed-off-by: Peter Antoine <peter.antoine@intel.com >
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484356631-16139-2-git-send-email-anusha.srivatsa@intel.com
2017-01-18 11:50:39 +02:00
Michal Wajdeczko
f9cda04867
drm/i915/guc: Move GuC log related functions into dedicated file
...
Functions supporting GuC logging capabilities were spread across
many files, with unnecessary exposures and mixed with unrelated
code. Dedicate file will make maintenance of all GuC functions
easier as more functions are coming to support GuC submissions.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com >
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170113174157.104492-1-michal.wajdeczko@intel.com
2017-01-18 07:29:04 +00:00
Laurent Pinchart
2668db3788
drm: bridge: dw-hdmi: Assert SVSRET before resetting the PHY
...
According to the PHY IP core vendor, the SVSRET signal must be asserted
before resetting the PHY. Tests on RK3288 and R-Car Gen3 showed no
regression, the change should thus be safe.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-20-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:37 +05:30
Laurent Pinchart
54d72737b0
drm: bridge: dw-hdmi: Fix the name of the PHY reset macros
...
The PHY reset signal is controlled by bit PHYRSTZ in the MC_PHYRSTZ
register. The signal is active low on Gen1 PHYs and active high on Gen2
PHYs. The driver toggles the signal high then low, which is correct for
all currently supported platforms, but the register values macros are
incorrectly named. Replace them with a single macro named after the bit,
and add a comment to the source code to explain the behaviour.
The driver's behaviour isn't changed by this rename, the code will still
need to be fixed to support Gen1 PHYs.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-19-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:37 +05:30
Laurent Pinchart
f0e7f2f3b6
drm: bridge: dw-hdmi: Define and use macros for PHY register addresses
...
Replace the hardcoded register address numerical values with macros to
clarify the code.
This change has been tested by comparing the assembly code before and
after the change.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-18-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:36 +05:30
Laurent Pinchart
faba6c3cff
drm: bridge: dw-hdmi: Detect PHY type at runtime
...
Detect the PHY type and use it to handle the PHY type-specific SVSRET
signal.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-17-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:36 +05:30
Laurent Pinchart
be41fc55f1
drm: bridge: dw-hdmi: Handle overflow workaround based on device version
...
Use the device version queried at runtime instead of the device type
provided through platform data to handle the overflow workaround. This
will make support of other SoCs integrating the same HDMI TX controller
version easier.
Among the supported platforms only i.MX6DL and i.MX6Q have been
identified as needing the workaround. Disabling it on Rockchip RK3288
(which integrates a v2.00a controller) didn't produce any error or
artifact.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-16-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:35 +05:30
Laurent Pinchart
0c674948b7
drm: bridge: dw-hdmi: Detect AHB audio DMA using correct register
...
Bit 0 in CONFIG1_ID tells whether the IP core uses an AHB slave
interface for control. The correct way to identify AHB audio DMA support
is through bit 1 in CONFIG3_ID.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-15-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:35 +05:30
Laurent Pinchart
0527e12e82
drm: bridge: dw-hdmi: Reject invalid product IDs
...
The DWC HDMI TX can be recognized by the two product identification
registers. If the registers don't read as expect the IP will be very
different than what the driver has been designed for, or will be
misconfigured in a way that makes it non-operational (invalid memory
address, incorrect clocks, ...). We should reject this situation with an
error.
While this isn't critical for proper operation with supported IPs at the
moment, the driver will soon gain automatic device-specific handling
based on runtime device identification. This change makes it easier to
implement that without having to default to a random guess in case the
device can't be identified.
While at it print a readable version number in the device identification
message instead of raw register values.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-14-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:34 +05:30
Laurent Pinchart
f4104e8fe1
drm: bridge: dw-hdmi: Rename CONF0 SPARECTRL bit to SVSRET
...
The bit is documented in a Rockchip BSP as
#define m_SVSRET_SIG (1 << 5) /* depend on PHY_MHL_COMB0=1 */
This is confirmed by a Renesas platform, which uses a 2.0 DWC HDMI TX as
the RK3288. Rename the bit accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-13-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:34 +05:30
Kieran Bingham
1acc6bdeee
drm: bridge: dw-hdmi: Remove PHY configuration resolution parameter
...
The current code hard codes the call of hdmi_phy_configure() to be 8bpp
and provides extraneous error checking to verify that this hardcoded
value is correct. Simplify the implementation by removing the argument.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-12-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:34 +05:30
Laurent Pinchart
69497eb923
drm: bridge: dw-hdmi: Implement DRM bridge registration
...
As an option for drivers not based on the component framework, register
the bridge with the DRM core with the DRM bridge API. Existing drivers
based on dw_hdmi_bind() and dw_hdmi_unbind() are not affected as those
functions are preserved with their current behaviour.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-11-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:33 +05:30
Laurent Pinchart
d2ae94ae84
drm: bridge: dw-hdmi: Create connector in the bridge attach operation
...
The DRM device is not guaranteed by the bridge API to be available
before the attach callback. The driver performs properly at the moment
as it doesn't use the drm_bridge_add() registration method. As this will
be changed later, move connector creation to attach time to ensure
compatibility with the API.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-10-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:33 +05:30
Laurent Pinchart
fd30b38c27
drm: bridge: dw-hdmi: Reorder functions to prepare for next commit
...
The next commit will reference structures and functions in a way that
currently requires forward declarations. Reorder the functions to avoid
that. No functional change to the code is performed.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-9-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:32 +05:30
Laurent Pinchart
c608119dfd
drm: bridge: dw-hdmi: Move IRQ and IO resource allocation to common code
...
There's no need to duplicate identical code in multiple drivers (two at
the moment, one more to come soon). Move it to the dw-hdmi core where it
can be shared. If resource allocation ever becomes device-specific later
we'll always have the option of splitting it out again.
While it at pass the platform device to the bind function to avoid
having to cast struct device to struct platform_device.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-8-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:32 +05:30
Laurent Pinchart
ba5d7e6160
drm: bridge: dw-hdmi: Don't forward HPD events to DRM core before attach
...
Hotplug events should only be forwarded to the DRM core by the interrupt
handler when the bridge has been attached, otherwise the DRM device
pointer will be NULL, resulting in a crash.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-7-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:31 +05:30
Laurent Pinchart
527b863f6a
drm: bridge: dw-hdmi: Remove encoder field from struct dw_hdmi
...
The field isn't needed, remove it.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-6-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:31 +05:30
Laurent Pinchart
70c963ec4f
drm: bridge: dw-hdmi: Embed drm_bridge in struct dw_hdmi
...
The drm_bridge instance is always needed, there's no point in allocating
it separately.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-5-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:30 +05:30
Kieran Bingham
dfa73065d6
drm: bridge: dw-hdmi: Remove unused function parameter
...
The 'prep' parameter passed to hdmi_phy_configure() is useless. It is
hardcoded as 0, and if set, simply prevents the configure function from
executing.
Remove it.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-4-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:30 +05:30
Laurent Pinchart
ecaa98f1e6
drm: bridge: dw-hdmi: Remove unneeded arguments to bind/unbind functions
...
The master argument isn't used. The data argument, a void pointer, is
used by the bind function only where it's cast to a drm_device pointer,
which can easily be obtained from the encoder argument instead. Remove
them.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-3-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:30 +05:30
Laurent Pinchart
cc7e962327
drm: bridge: dw-hdmi: Merge __hdmi_phy_i2c_write and hdmi_phy_i2c_write
...
The latter is just an int wrapper around the former void function that
unconditionally returns 0. As the return value is never checked, merge
the two functions into one.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Jose Abreu <joabreu@synopsys.com >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-2-laurent.pinchart+renesas@ideasonboard.com
2017-01-18 09:29:29 +05:30
Ville Syrjälä
a5e4c7d0aa
drm/i915: Ignore bogus plane coordinates on SKL when the plane is not visible
...
When the plane is invisible we may have all sorts of bogus stuff
in the coordinates, which we must ignore or else we might fail the
plane update. This started to happen on SKL when I moved the plane
offset computation to happen in the check phase. Previously we
happily ignored it all since we never called the update_plane hook
with an invisible plane.
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com >
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: b63a16f6cd
("drm/i915: Compute display surface offset in the plane check hook for SKL+")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98258
Testcase: igt/pm_rpm/legacy-planes
Testcase: igt/pm_rpm/universal-planes
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-3-git-send-email-ville.syrjala@linux.intel.com
2017-01-17 14:16:13 -08:00
Alex Deucher
17324b6add
drm/amdgpu: add support for new hainan variants
...
New hainan parts require updated smc firmware.
Cc: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-17 15:25:41 -05:00
Alex Deucher
4e6e98b1e4
drm/radeon: add support for new hainan variants
...
New hainan parts require updated smc firmware.
Cc: Sonny Jiang <sonny.jiang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-17 15:25:35 -05:00
Rex Zhu
ca581e4533
drm/amdgpu: change clock gating mode for uvd_v4.
...
use sw cg when decode. and hw cg when idle.
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=99313
https://bugzilla.kernel.org/show_bug.cgi?id=192161
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Ack-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-17 15:25:26 -05:00
Rex Zhu
50a1ebc70a
drm/amdgpu: fix program vce instance logic error.
...
need to clear bit31-29 in GRBM_GFX_INDEX,
then the program can be valid.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-17 15:25:04 -05:00