Lee Shawn C
956aee8fa3
drm/i915/rkl: new rkl ddc map for different PCH
...
After boot into kernel. Driver configured ddc pin mapping based on
predefined table in parse_ddi_port(). Now driver configure rkl
ddc pin mapping depends on icp_ddc_pin_map[]. Then this table will
give incorrect gmbus port number to cause HDMI can't work.
Refer to commit cd0a89527d ("drm/i915/rkl: Add DDC pin mapping").
Create two ddc pin table for rkl TGP and CMP pch. Then HDMI can
works properly on rkl.
v2: update patch based on latest dinq branch.
v3: update ddc table for RKL+TGP sku.
RKL+CNP sku will load cnp_ddc_pin_map[] setting.
v4: modify the if/else judgment to avoid nesting.
v5: fix typo in v4.
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Aditya Swarup <aditya.swarup@intel.com >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Cooper Chiou <cooper.chiou@intel.com >
Cc: Khaled Almahallawy <khaled.almahallawy@intel.com >
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2577
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com >
Reviewed-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201117142629.28729-1-shawn.c.lee@intel.com
2021-01-05 19:32:34 -05:00
Rodrigo Vivi
4565e04254
Merge tag 'gvt-next-fixes-2020-12-25' of https://github.com/intel/gvt-linux into drm-intel-next
...
gvt-next-fixes-2020-12-25
- Avoid one useless inline (Jani)
- make gvt header self-contained, fix CONFIG_DRM_I915_WERROR (Jani)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
From: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201225022009.GF16939@zhen-hp.sh.intel.com
2021-01-05 15:28:10 -05:00
José Roberto de Souza
6b9663413b
drm/i915/display/psr: Program plane's calculated offset to plane SF register
...
It programs Plane's calculated x, y, offset to Plane SF register.
It does the calculation of x and y offsets using
skl_calc_main_surface_offset().
v3: Update commit message
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Tested-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210104205654.238928-4-jose.souza@intel.com
2021-01-05 05:32:56 -08:00
José Roberto de Souza
ca1100f341
drm/i915/display: Split and export main surface calculation from skl_check_main_surface()
...
The calculation the offsets of the main surface will be needed by PSR2
selective fetch code so here splitting and exporting it.
No functional changes were done here.
v3: Rebased
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Tested-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210104205654.238928-3-jose.souza@intel.com
2021-01-05 05:32:53 -08:00
José Roberto de Souza
3fea9f4244
drm/i915/display/psr: Use plane damage clips to calculate damaged area
...
Now using plane damage clips property to calcualte the damaged area.
Selective fetch only supports one region to be fetched so software
needs to calculate a bounding box around all damage clips.
Now that we are not complete fetching each plane, there is another
loop needed as all the plane areas that intersect with the pipe
damaged area needs to be fetched from memory so the complete blending
of all planes can happen.
v2:
- do not shifting new_plane_state->uapi.dst only src is in 16.16 format
v4:
- setting plane selective fetch area using the whole pipe damage area
- mark the whole plane area damaged if plane visibility or alpha
changed
v5:
- taking in consideration src.y1 in the damage coordinates
- adding to the pipe damaged area planes that were visible but are
invisible in the new state
v6:
- consider old state plane coordinates when visibility changes or it
moved to calculate damaged area
- remove from damaged area the portion not in src clip
v7:
- intersec every damage clip with src to minimize damaged area
v8:
- adjust pipe_damaged area to 4 lines grouping
- adjust calculation now that is understood that uapi.src is the
framebuffer coordinates that plane will start to fetch from
v9:
- Only add plane dst or src to damaged_area if visible
- Early skip plane damage calculation if it was not visible in old and
new state
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210104205654.238928-2-jose.souza@intel.com
2021-01-05 05:32:53 -08:00
José Roberto de Souza
7d8ac172d7
drm: Add function to convert rect in 16.16 fixed format to regular format
...
Much more clear to read one function call than four lines doing this
conversion.
v7:
- function renamed
- calculating width and height before truncate
- inlined
v10:
- renamed parameters from source and destination to src and dst
to match sister functions
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: dri-devel@lists.freedesktop.org
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210104205654.238928-1-jose.souza@intel.com
2021-01-05 05:32:52 -08:00
Chris Wilson
b3304591f1
drm/i915/dp: Track pm_qos per connector
...
Since multiple connectors may run intel_dp_aux_xfer conncurrently, a
single global pm_qos does not suffice. (One connector may disable the
dma-latency boost prematurely while the second is still depending on
it.) Instead of a single global pm_qos, track the pm_qos request for
each intel_dp.
v2: Move the pm_qos setup/teardown to intel_dp_aux_init/fini
Fixes: 9ee32fea5f ("drm/i915: irq-drive the dp aux communication")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201230202309.23982-1-chris@chris-wilson.co.uk
2020-12-30 21:22:55 +00:00
Lyude Paul
021a3ac2a0
drm/i915/dp: Add register definitions for Intel HDR backlight interface
...
No functional changes yet, this just adds definitions for all of the
known DPCD registers used by Intel's HDR backlight interface. Since
we'll only ever use this in i915, we just define them in
intel_dp_aux_backlight.c
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Lyude Paul <lyude@redhat.com >
Cc: thaytan@noraisin.net
Cc: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204223603.249878-7-lyude@redhat.com
2020-12-23 17:44:56 +02:00
Lyude Paul
8fd1806d36
drm/i915/dp: Rename eDP VESA backlight interface functions
...
Since we're about to add support for a second type of backlight control
interface over DP AUX (specifically, Intel's proprietary HDR backlight
controls) let's rename all of the current backlight hooks we have for
vesa to make it clear that they're specific to the VESA interface and
not Intel's.
v3:
* Rebase
Signed-off-by: Lyude Paul <lyude@redhat.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: thaytan@noraisin.net
Cc: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204223603.249878-6-lyude@redhat.com
2020-12-23 17:44:40 +02:00
Lyude Paul
6423cb7f92
drm/i915: Pass down brightness values to enable/disable backlight callbacks
...
Instead of using intel_panel->backlight.level, have the caller provide us
with the current panel backlight value. We'll need this for when we
separate PWM-related backlight callbacks from other means of backlight
control (like DPCD backlight controls), as the caller of each PWM callback
will be responsible for converting the current brightness value to it's
respective PWM level.
Signed-off-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204223603.249878-4-lyude@redhat.com
2020-12-23 17:44:04 +02:00
Lyude Paul
390218ca9b
drm/i915: Rename pwm_* backlight callbacks to ext_pwm_*
...
Since we're going to need to add a set of lower-level PWM backlight
control hooks to be shared by normal backlight controls and HDR
backlight controls in SDR mode, let's add a prefix to the external PWM
backlight functions so that the difference between them and the high
level PWM-only backlight functions is a bit more obvious.
This introduces no functional changes.
Signed-off-by: Lyude Paul <lyude@redhat.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Cc: thaytan@noraisin.net
Cc: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204223603.249878-3-lyude@redhat.com
2020-12-23 16:58:10 +02:00
Lyude Paul
f12110afee
drm/i915/dp: Program source OUI on eDP panels
...
Since we're about to start adding support for Intel's magic HDR
backlight interface over DPCD, we need to ensure we're properly
programming this field so that Intel specific sink services are exposed.
Otherwise, 0x300-0x3ff will just read zeroes.
We also take care not to reprogram the source OUI if it already matches
what we expect. This is just to be careful so that we don't accidentally
take the panel out of any backlight control modes we found it in.
v2:
* Add careful parameter to intel_edp_init_source_oui() to avoid
re-writing the source OUI if it's already been set during driver
initialization
Signed-off-by: Lyude Paul <lyude@redhat.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: thaytan@noraisin.net
Cc: Vasily Khoruzhick <anarsoul@gmail.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204223603.249878-2-lyude@redhat.com
2020-12-23 16:58:04 +02:00
Dave Airlie
00a16d02f4
drm/i915: refactor i915 plane code into separate file.
...
Ville suggested this as a good idea, let's move this before moving
the crtc code.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
[Jani: fixed i915xx_plane.h standalone build.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201221110957.18215-1-jani.nikula@intel.com
2020-12-22 10:09:50 +02:00
Dave Airlie
99ce270a1e
drm/i915: refactor cursor code out of i915_display.c
...
This file is a monster, let's start simple, the cursor plane code
seems pretty standalone, and splits out easily enough.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
[Jani: cleaned up intel_cursor.h a bit.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201221090449.8288-4-jani.nikula@intel.com
2020-12-22 10:09:05 +02:00
Dave Airlie
d6933784e6
drm/i915/display: fix misused comma
...
There is no need for a comma use here.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201221090449.8288-3-jani.nikula@intel.com
2020-12-22 10:09:03 +02:00
Dave Airlie
175c13d143
drm/i915/display: move to_intel_frontbuffer to header
...
This will be used for some refactoring in other files, so move it
first.
Signed-off-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201221090449.8288-2-jani.nikula@intel.com
2020-12-22 10:08:56 +02:00
Dave Airlie
1e4da5df21
drm/i915/display: move needs_modeset to an inline in header
...
This function is going to be used in a later change, so clean it
up first before moving it.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201221090449.8288-1-jani.nikula@intel.com
2020-12-22 10:08:52 +02:00
Jani Nikula
e056f669db
drm/i915/gvt: make mpt.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/73958c4ed1d94aa581acd91f7d7e82785b13d07e.1607422863.git.jani.nikula@intel.com
2020-12-22 11:41:35 +08:00
Jani Nikula
e6a14b1016
drm/i915/gvt: make scheduler.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/3949d345330155c6223ed947215b54c1285a0db5.1607422863.git.jani.nikula@intel.com
2020-12-22 11:41:03 +08:00
Jani Nikula
fbf24f55f8
drm/i915/gvt: make gvt.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/dc4f4d498a39279d12096c1487a3c50d201e5e4f.1607422863.git.jani.nikula@intel.com
2020-12-22 11:40:40 +08:00
Jani Nikula
bb2d5096de
drm/i915/gvt: make mmio_context.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/979ba0ea394e9589f7332b94e91ac200faf995c5.1607422863.git.jani.nikula@intel.com
2020-12-22 11:40:19 +08:00
Jani Nikula
9c615cc47b
drm/i915/gvt: make interrupt.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/3a1060d0e9b951d76815745f466efc17a7c85741.1607422863.git.jani.nikula@intel.com
2020-12-22 11:39:53 +08:00
Jani Nikula
33a357da2f
drm/i915/gvt: make gtt.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/ed11c982872c7c3bef4f22d13dfa029e18e980a9.1607422863.git.jani.nikula@intel.com
2020-12-22 11:39:30 +08:00
Jani Nikula
265f6c0fd2
drm/i915/gvt: make fb_decoder.h self-contained
...
Add necessary #includes and forward declarations to make the header
compile on its own.
While at it, also remove a useless forward declaration.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/46c2acf80f1d214182a96a97fa6322ab89a3de05.1607422863.git.jani.nikula@intel.com
2020-12-22 11:39:05 +08:00
Jani Nikula
c0209e40d0
drm/i915/gvt: make execlist.h self-contained
...
Remove unused declaration.
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/e201af3bcf8e1bc389ae501ea5e3572b95e66f55.1607422863.git.jani.nikula@intel.com
2020-12-22 11:37:45 +08:00
Ville Syrjälä
4294fa5f50
drm/i915: Reduce duplicated switch cases in hpd code
...
With GEN11_HOTPLUG_CTL_LONG_DETECT(), SHOTPLUG_CTL_DDI_HPD_LONG_DETECT()
and ICP_TC_HPD_LONG_DETECT() taking the hpd_pin as their argument
we can remove some duplication in the long_detect() switch statements.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204182309.14213-1-ville.syrjala@linux.intel.com
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
2020-12-15 23:13:21 +02:00
Sean Paul
7cb917b2b7
drm/i915/display/tc: Only WARN once for bogus tc port flag
...
No need to spam syslog/console when we can ignore/fix the flag.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201209211828.53193-1-sean@poorly.run
2020-12-11 15:07:56 +02:00
Imre Deak
3a9ec563a4
drm/i915/icl: Fix initing the DSI DSC power refcount during HW readout
...
For an enabled DSC during HW readout the corresponding power reference
is taken along the CRTC power domain references in
get_crtc_power_domains(). Remove the incorrect get ref from the DSI
encoder hook.
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201209153952.3397959-1-imre.deak@intel.com
2020-12-10 20:39:43 +02:00
Jani Nikula
fd8a5b27ff
drm/i915/bios: fill in DSC rc_model_size from VBT
...
The VBT fields match the DPCD data, so use the same helper.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/43fba75d89525413aed0bdbb082c26b09458bd46.1607429866.git.jani.nikula@intel.com
2020-12-10 10:51:03 +02:00
Jani Nikula
a8f65ba3c2
drm/dsc: add helper for calculating rc buffer size from DPCD
...
Add a helper for calculating the rc buffer size from the DCPD offsets
DP_DSC_RC_BUF_BLK_SIZE and DP_DSC_RC_BUF_SIZE.
Cc: Alex Deucher <alexdeucher@gmail.com >
Cc: Harry Wentland <hwentlan@amd.com >
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/6c6aee22740fe7a8cf2b8e768bfda378850cf59a.1607429866.git.jani.nikula@intel.com
2020-12-10 10:49:47 +02:00
Jani Nikula
420798a09d
drm/i915/dsc: make rc_model_size an encoder defined value
...
Move the initialization of the rc_model_size from the common code into
encoder code, allowing different encoders to specify the size according
to their needs. Keep using the hard coded value in the encoders for now
to make this a non-functional change.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/6843c4f6958619f7389180aa92fded7b9fdbb4ba.1607429866.git.jani.nikula@intel.com
2020-12-10 10:49:27 +02:00
Jani Nikula
e5b9cbd381
drm/i915/dsc: configure hardware using specified rc_model_size
...
The rc_model_size is specified in the DSC config, and the hardware
programming should respect that instead of hard coding a value of 8192.
Regardless, the rc_model_size in DSC config is currently hard coded to
the same value, so this should have no impact, other than allowing the
use of other sizes as needed.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/27d86ad25832bbb985f6e996f3d02dca01a66895.1607429866.git.jani.nikula@intel.com
2020-12-10 10:48:53 +02:00
Jani Nikula
1f22ed3691
drm/dsc: use rc_model_size from DSC config for PPS
...
The PPS is supposed to reflect the DSC config instead of hard coding the
rc_model_size. Make it so.
Currently all users of drm_dsc_pps_payload_pack() hard code the size to
8192 also in the DSC config, so this change should have no impact, other
than allowing the drivers to use other sizes as needed.
Cc: Alex Deucher <alexdeucher@gmail.com >
Cc: Harry Wentland <hwentlan@amd.com >
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c3246aff585efcd728ee3dc96f52db5e46f6a162.1607429866.git.jani.nikula@intel.com
2020-12-10 10:48:19 +02:00
Manasi Navare
d371d6ea92
drm/i915/display/dp: Compute the correct slice count for VDSC on DP
...
This patch fixes the slice count computation algorithm
for calculating the slice count based on Peak pixel rate
and the max slice width allowed on the DSC engines.
We need to ensure slice count > min slice count req
as per DP spec based on peak pixel rate and that it is
greater than min slice count based on the max slice width
advertised by DPCD. So use max of these two.
In the prev patch we were using min of these 2 causing it
to violate the max slice width limitation causing a blank
screen on 8K@60.
Fixes: d9218c8f6c ("drm/i915/dp: Add helpers for Compressed BPP and Slice Count for DSC")
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Cc: <stable@vger.kernel.org > # v5.0+
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204205804.25225-1-manasi.d.navare@intel.com
2020-12-07 17:47:13 -08:00
Manasi Navare
4b970408db
drm/i915/dp: No need to poll FEC Enable Live bit
...
The Bspec does not mention polling the FEC Enable
Live status bit. That is only there for debug purposes.
So remove the polling from driver.
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com >
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201125072634.27664-1-manasi.d.navare@intel.com
2020-12-07 17:33:50 -08:00
Chris Wilson
9d8fddf857
drm/i915: Disable outputs during unregister
...
Switch off the scanout during driver unregister, so we can shutdown the
HW immediately for unbind.
v2: Remove the old shutdown from remove, it should now be redundant.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201204161601.20897-1-chris@chris-wilson.co.uk
2020-12-04 19:21:09 +00:00
Ville Syrjälä
005650283a
drm/i915: Call kill_bigjoiner_slave() earlier
...
Let's do the kill_bigjoiner_slave() thing from
intel_bigjoiner_add_affected_crtcs() since it's related to
what we do there. This cleans up the logic in the
compute_config() loop a bit.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201124201156.17095-4-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
2020-12-04 19:08:43 +02:00
Ville Syrjälä
72305a8080
drm/i915: Properly flag modesets for all bigjoiner pipes
...
If either of the bigjoiner pipes needs a modeset then we need
a modeset on both pipes. Make it so.
v2: Split out the kill_bigjoiner_slave() change (Manasi)
Add affected connectors/planes
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201124201156.17095-3-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
2020-12-04 19:07:45 +02:00
Ville Syrjälä
9e363c82ba
drm/i915: Add intel_atomic_add_affected_planes()
...
drm_atomic_add_affected_planes() only considers planes which
are logically enabled in the uapi state. For bigjoiner we need
to consider planes logically enabled in the hw state. Add a
helper for that.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201124201156.17095-2-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
2020-12-04 19:07:24 +02:00
Ville Syrjälä
ee42ec19ca
drm/i915: Track logically enabled planes for hw state
...
Currently crtc_state->uapi.plane_mask only tracks logically
enabled planes on the uapi level. For bigjoiner purposes
we want to do the same for the hw state. Let's follow the
pattern established by active_planes & co. here.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201124201156.17095-1-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
2020-12-04 19:06:18 +02:00
Manasi Navare
97ffcd0d1e
drm/i915: Add VRR_CTL_LINE_COUNT field to VRR_CTL register def
...
VRR_CTL register only had a GENMASK but no field prep
define for TRANS_VRR_CTL_LINE_COUNT field so add that
Cc: Aditya Swarup <aditya.swarup@intel.com >
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201202182727.26158-1-manasi.d.navare@intel.com
2020-12-03 14:49:47 -08:00
Chris Wilson
cf977e1861
drm/i915/gem: Spring clean debugfs
...
Throw away all the debugfs entries that are not being actively used for
debugging/developing IGT. Note that a couple of these are already and
will remain available under the gt/
Files removed:
i915_gem_fence_regs
i915_gem_interrupt
i915_ring_freq_table
i915_context_status
i915_llc
i915_shrinker_info
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Andi Shyti <andi.shyti@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Andi Shyti <andi.shyti@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201202112140.16759-1-chris@chris-wilson.co.uk
2020-12-03 17:34:22 +00:00
Imre Deak
e352934659
drm/i915: Make intel_display_power_put_unchecked() an internal-only function
...
All the display power domain references are wakeref tracked now, so we
can mark intel_display_power_put_unchecked() as an internal function
(for suppressing wakeref tracking in non-debug builds).
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130212200.2811939-10-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
93b916fda6
drm/i915: Track power reference taken to disable power well functionality
...
Add wakeref tracking for the display power domain reference taken to
keep the display power well functionality disabled.
v2: Add missing wakeref zeroing to intel_power_domains_driver_remove()
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201161340.2879202-2-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
a0b024ed10
drm/i915: Rename power_domains.wakeref to init_wakeref
...
Rename power_domains.wakeref to power_domains.init_wakeref to make the
use of this reference clearer. The next patch adds tracking for another
power reference user of the power_domains functionality.
While at it add a missing zero wakeref assert when setting the wakeref.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130212200.2811939-8-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
719065500b
drm/i915: Track power reference taken for eDP VDD
...
Add wakeref tracking for the eDP encoders' AUX display power domain
references taken while the panel's VDD is enabled.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130212200.2811939-7-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
162e68e133
drm/i915/ddi: Track power reference taken for encoder main lane AUX use
...
Add wakeref tracking for the DDI encoders' main lane AUX display power
domain references.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130212200.2811939-6-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
a4550977a0
drm/i915/ddi: Track power reference taken for encoder DDI IO use
...
Add wakeref tracking for the DDI encoders' DDI_IO display power domain
references.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130212200.2811939-5-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
802034849a
drm/i915: Track power references taken for enabled CRTCs
...
Add wakeref tracking for display power domain references taken for
enabled CRTCs.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201130212200.2811939-4-imre.deak@intel.com
2020-12-03 15:31:55 +02:00
Imre Deak
6979cb9a2c
drm/i915: Factor out helpers to get/put a set of tracked power domains
...
Factor out helper functions to get/put a set of power domains that are
tracked using their wakeref handles. The same is needed by the next
patch adding tracking for enabled CRTC power domains.
v2: s/uint64_t/u64/ (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20201201161340.2879202-1-imre.deak@intel.com
2020-12-03 15:31:55 +02:00