Jason Yan
2f39766ea2
video: fbdev: sis: remove unneeded semicolon
...
Eliminate the following coccicheck warning:
drivers/video/fbdev/sis/sis_accel.h:143:72-73: Unneeded semicolon
drivers/video/fbdev/sis/sis_accel.h:144:72-73: Unneeded semicolon
drivers/video/fbdev/sis/sis_accel.h:145:72-73: Unneeded semicolon
drivers/video/fbdev/sis/sis_accel.h:273:75-76: Unneeded semicolon
drivers/video/fbdev/sis/sis_accel.h:274:75-76: Unneeded semicolon
drivers/video/fbdev/sis/sis_accel.h:275:73-74: Unneeded semicolon
drivers/video/fbdev/sis/sis_accel.h:276:75-76: Unneeded semicolon
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200910140536.1191150-1-yanaijie@huawei.com
2020-10-17 08:22:32 +02:00
Jason Yan
4caca3d8f9
drm/panel: st7703: Make jh057n00900_panel_desc static
...
This eliminates the following sparse warning:
drivers/gpu/drm/panel/panel-sitronix-st7703.c:156:26: warning: symbol
'jh057n00900_panel_desc' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Reviewed-by: Guido Günther <agx@sigxcpu.org >
[Use static const]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200912033809.142773-1-yanaijie@huawei.com
2020-10-17 08:13:22 +02:00
Jason Yan
759962b5dc
drm: bridge: adv7511: make adv7511_hdmi_hw_params() static
...
This eliminates the following sparse warning:
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c:58:5: warning: symbol
'adv7511_hdmi_hw_params' was not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200912033826.142923-1-yanaijie@huawei.com
2020-10-17 08:12:00 +02:00
Jason Yan
7d3618fdee
drm/bridge: analogix_dp: make analogix_dp_start_aux_transaction() static
...
This eliminates the following sparse warning:
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:527:5: warning: symbol
'analogix_dp_start_aux_transaction' was not declared. Should it be
static?
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200912033843.143240-1-yanaijie@huawei.com
2020-10-17 08:11:50 +02:00
Liu Shixin
ba43961b2d
drm/panel: simplify the return expression of rb070d30_panel_enable()
...
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200915032623.1772361-1-liushixin2@huawei.com
2020-10-17 08:10:42 +02:00
Liu Shixin
7604caa1f0
omapfb: connector-dvi: simplify the return expression of dvic_connect()
...
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200915032627.1772517-1-liushixin2@huawei.com
2020-10-17 08:10:10 +02:00
Qilong Zhang
f215d60037
omapfb: use devm_platform_ioremap_resource_byname
...
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Qilong Zhang <zhangqilong3@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
[fixed warning - unused variable]
[fixed checkpatch warning - fixed indent]
Link: https://patchwork.freedesktop.org/patch/msgid/20200916111353.105914-1-zhangqilong3@huawei.com
2020-10-16 23:55:27 +02:00
Qinglang Miao
3da1781ea4
fbdev: nvidia: use for_each_child_of_node() macro
...
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200916062123.190636-1-miaoqinglang@huawei.com
2020-10-16 23:43:41 +02:00
Xin Ji
8bdfc5dae4
drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP
...
The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed
for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K.
Signed-off-by: Xin Ji <xji@analogixsemi.com >
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/528b76c1a4f7b6ea85371bfae4bde389aec4bb24.1600423932.git.xji@analogixsemi.com
2020-10-16 23:35:16 +02:00
Xin Ji
9aab66010e
dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema
...
anx7625: MIPI to DP transmitter DT schema
Signed-off-by: Xin Ji <xji@analogixsemi.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/bafa02aa50c5c29b3336ca6930c406150a3c60d2.1600423932.git.xji@analogixsemi.com
2020-10-16 23:35:11 +02:00
Qinglang Miao
defa1dcc56
omapfb: simplify the return expression of hdmi_pll_enable
...
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131112.93411-1-miaoqinglang@huawei.com
2020-10-16 23:16:40 +02:00
Qinglang Miao
10732a0f64
omapfb: panel-sony-acx565akm: simplify the return expression of acx565akm_connect()
...
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131052.92707-1-miaoqinglang@huawei.com
2020-10-16 23:16:40 +02:00
Qinglang Miao
ea65a99bb8
omapfb: connector-hdmi: simplify the return expression of hdmic_connect
...
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org > # dropped gpio-cs5535.c changes
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131051.92661-1-miaoqinglang@huawei.com
2020-10-16 23:16:28 +02:00
Qinglang Miao
63da0977f5
omapfb: connector-analog-tv: simplify the return expression of tvc_connect()
...
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921131049.92616-1-miaoqinglang@huawei.com
2020-10-16 23:11:10 +02:00
Liu Shixin
43624b403b
omapfb: simplify the return expression of tpo_td043_connect
...
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921082445.2591825-1-liushixin2@huawei.com
2020-10-16 23:10:44 +02:00
Liu Shixin
533278ca0d
omapfb: simplify the return expression of sharp_ls_connect
...
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921082444.2591773-1-liushixin2@huawei.com
2020-10-16 23:10:41 +02:00
Liu Shixin
ef27afa607
omapfb: simplify the return expression of panel_dpi_connect
...
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200921082443.2591721-1-liushixin2@huawei.com
2020-10-16 23:10:38 +02:00
Biju Das
9e9b18b681
drm/bridge: lvds-codec: Add support for regulator
...
Add the support for enabling optional regulator that may be used as VCC
source.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
[Replaced 'error' variable with 'ret']
[Renamed regulator from 'vcc' to 'power']
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com >
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200922105526.5252-1-laurent.pinchart+renesas@ideasonboard.com
2020-10-16 23:01:55 +02:00
Wang Qing
7488555821
video: use kobj_to_dev()
...
Use kobj_to_dev() instead of container_of()
Signed-off-by: Wang Qing <wangqing@vivo.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1600776867-24226-1-git-send-email-wangqing@vivo.com
2020-10-16 22:59:00 +02:00
Li Heng
0ad086e07d
video: Remove set but not used variable
...
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/video/fbdev/sis/300vtbl.h:1064:28: warning:
‘SiS300_CHTVVCLKSONTSC’ defined but not used [-Wunused-const-variable=]
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Li Heng <liheng40@huawei.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1600957106-13741-1-git-send-email-liheng40@huawei.com
2020-10-16 22:52:10 +02:00
Yannick Fertre
37e6011b3c
drm/panel: rm68200: fix mode to 50fps
...
Compute new timings to get a framerate of 50fps with a pixel clock
@54Mhz.
Signed-off-by: Yannick Fertre <yannick.fertre@st.com >
Tested-by: Philippe Cornu <philippe.cornu@st.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200925141618.12097-1-yannick.fertre@st.com
2020-10-16 22:48:40 +02:00
Xu Wang
06dd6f303f
drm/bridge: ti-sn65dsi86: remove redundant null check
...
Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove it
Signed-off-by: Xu Wang <vulab@iscas.ac.cn >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200930081859.52431-1-vulab@iscas.ac.cn
2020-10-16 21:04:00 +02:00
Douglas Anderson
137655d1ed
drm/bridge: ti-sn65dsi86: Add retries for link training
...
On some panels hooked up to the ti-sn65dsi86 bridge chip we found that
link training was failing. Specifically, we'd see:
ti_sn65dsi86 2-002d: [drm:ti_sn_bridge_enable] *ERROR* Link training failed, link is off (-5)
The panel was hooked up to a logic analyzer and it was found that, as
part of link training, the bridge chip was writing a 0x1 to DPCD
address 00600h and the panel responded NACK. As can be seen in header
files, the write of 0x1 to DPCD address 0x600h means we were trying to
write the value DP_SET_POWER_D0 to the register DP_SET_POWER. The
panel vendor says that a NACK in this case is not unexpected and means
"not ready, try again".
In testing, we found that this panel would respond with a NACK in
about 1/25 times. Adding the retry logic worked fine and the most
number of tries needed was 3. Just to be safe, we'll add 10 tries
here and we'll add a little blurb to the logs if we ever need more
than 5.
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Tested-By: Steev Klimaszewski <steev@kali.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201002135920.1.I2adbc90b2db127763e2444bd5a4e5bf30e1db8e5@changeid
2020-10-16 20:34:24 +02:00
Guido Günther
1c902de389
dt-binding: display: Require two resets on mantix panel
...
We need to reset both for the panel to show an image.
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/15d3dc7eb4e031f380be1298ed3ac9085626f26b.1602584953.git.agx@sigxcpu.org
2020-10-16 16:24:32 +02:00
Guido Günther
787099f867
drm/panel: mantix: Fix panel reset
...
The mantix panel needs two reset lines (RESX and TP_RSTN) deasserted to
output an image. Only deasserting RESX is not enough and the display
will stay blank. Deassert in prepare() and assert in unprepare() to keep
device held in reset when off.
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/ba71a8ab010d263a8058dd4f711e3bcd95877bf2.1602584953.git.agx@sigxcpu.org
2020-10-16 16:24:29 +02:00
Guido Günther
f41b019aa5
drm/panel: mantix: Don't dereference NULL mode
...
Don't dereference mode which was just NULL checked.
Signed-off-by: Guido Günther <agx@sigxcpu.org >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/659158549f3c6cc1c71ceed0943e760e861c1206.1602584953.git.agx@sigxcpu.org
2020-10-16 16:24:25 +02:00
Xu Wang
5988c2695f
video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
...
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201014085722.26069-1-vulab@iscas.ac.cn
2020-10-16 11:50:31 +02:00
Xu Wang
f57074189d
omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
...
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn >
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20201014084920.25813-1-vulab@iscas.ac.cn
2020-10-16 11:50:16 +02:00
Daniel Vetter
488c888ae1
drm/vkms: Switch to shmem helpers
...
Inspired by a patch by Chris Wilson for vgem. Plus this gives us vmap
at the gem bo level, which we need for generic fbdev emulation.
Luckily shmem also tracks ->vaddr, so we just need to adjust the code
all over a bit to make this fit.
Also wire up handle_to_fd, dunno why that was missing.
v2:
- Drop now unused container_of #define (Melissa)
- Make sure we keep creating cached objects, this is for testing
(Thomas)
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: David Airlie <airlied@linux.ie >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Cc: Melissa Wen <melissa.srw@gmail.com >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20201013111027.375999-1-daniel.vetter@ffwll.ch
2020-10-15 23:37:58 +02:00
Daniel Vetter
063bc37d46
drm/vkms: Set preferred depth correctly
...
The only thing we support is xrgb8888.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Melissa Wen <melissa.srw@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Cc: Melissa Wen <melissa.srw@gmail.com >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20201009232156.3916879-1-daniel.vetter@ffwll.ch
2020-10-15 23:37:05 +02:00
Jianxin Xiong
ac80cd17a6
dma-buf: Clarify that dma-buf sg lists are page aligned
...
The dma-buf API have been used under the assumption that the sg lists
returned from dma_buf_map_attachment() are fully page aligned. Lots of
stuff can break otherwise all over the place. Clarify this in the
documentation and add a check when DMA API debug is enabled.
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/1602692161-107096-1-git-send-email-jianxin.xiong@intel.com
2020-10-15 23:15:43 +02:00
Zwane Mwaikambo
73b62cdb93
drm/dp_aux_dev: check aux_dev before use in drm_dp_aux_dev_get_by_minor()
...
I observed this when unplugging a DP monitor whilst a computer is asleep
and then waking it up. This left DP chardev nodes still being present on
the filesystem and accessing these device nodes caused an oops because
drm_dp_aux_dev_get_by_minor() assumes a device exists if it is opened.
This can also be reproduced by creating a device node with mknod(1) and
issuing an open(2)
[166164.933198] BUG: kernel NULL pointer dereference, address: 0000000000000018
[166164.933202] #PF: supervisor read access in kernel mode
[166164.933204] #PF: error_code(0x0000) - not-present page
[166164.933205] PGD 0 P4D 0
[166164.933208] Oops: 0000 [#1 ] PREEMPT SMP NOPTI
[166164.933211] CPU: 4 PID: 99071 Comm: fwupd Tainted: G W
5.8.0-rc6+ #1
[166164.933213] Hardware name: LENOVO 20RD002VUS/20RD002VUS, BIOS R16ET25W
(1.11 ) 04/21/2020
[166164.933232] RIP: 0010:drm_dp_aux_dev_get_by_minor+0x29/0x70
[drm_kms_helper]
[166164.933234] Code: 00 0f 1f 44 00 00 55 48 89 e5 41 54 41 89 fc 48 c7
c7 60 01 a4 c0 e8 26 ab 30 d7 44 89 e6 48 c7 c7 80 01 a4 c0 e8 47 94 d6 d6
<8b> 50 18 49 89 c4 48 8d 78 18 85 d2 74 33 8d 4a 01 89 d0 f0 0f b1
[166164.933236] RSP: 0018:ffffb7d7c41cbbf0 EFLAGS: 00010246
[166164.933237] RAX: 0000000000000000 RBX: ffff8a90001fe900 RCX: 0000000000000000
[166164.933238] RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffffffffc0a40180
[166164.933239] RBP: ffffb7d7c41cbbf8 R08: 0000000000000000 R09: ffff8a93e157d6d0
[166164.933240] R10: 0000000000000000 R11: ffffffffc0a40188 R12: 0000000000000003
[166164.933241] R13: ffff8a9402200e80 R14: ffff8a90001fe900 R15: 0000000000000000
[166164.933244] FS: 00007f7fb041eb00(0000) GS:ffff8a9411500000(0000)
knlGS:0000000000000000
[166164.933245] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[166164.933246] CR2: 0000000000000018 CR3: 00000000352c2003 CR4: 00000000003606e0
[166164.933247] Call Trace:
[166164.933264] auxdev_open+0x1b/0x40 [drm_kms_helper]
[166164.933278] chrdev_open+0xa7/0x1c0
[166164.933282] ? cdev_put.part.0+0x20/0x20
[166164.933287] do_dentry_open+0x161/0x3c0
[166164.933291] vfs_open+0x2d/0x30
[166164.933297] path_openat+0xb27/0x10e0
[166164.933306] ? atime_needs_update+0x73/0xd0
[166164.933309] do_filp_open+0x91/0x100
[166164.933313] ? __alloc_fd+0xb2/0x150
[166164.933316] do_sys_openat2+0x210/0x2d0
[166164.933318] do_sys_open+0x46/0x80
[166164.933320] __x64_sys_openat+0x20/0x30
[166164.933328] do_syscall_64+0x52/0xc0
[166164.933336] entry_SYSCALL_64_after_hwframe+0x44/0xa9
(gdb) disassemble drm_dp_aux_dev_get_by_minor+0x29
Dump of assembler code for function drm_dp_aux_dev_get_by_minor:
0x0000000000017b10 <+0>: callq 0x17b15 <drm_dp_aux_dev_get_by_minor+5>
0x0000000000017b15 <+5>: push %rbp
0x0000000000017b16 <+6>: mov %rsp,%rbp
0x0000000000017b19 <+9>: push %r12
0x0000000000017b1b <+11>: mov %edi,%r12d
0x0000000000017b1e <+14>: mov $0x0,%rdi
0x0000000000017b25 <+21>: callq 0x17b2a <drm_dp_aux_dev_get_by_minor+26>
0x0000000000017b2a <+26>: mov %r12d,%esi
0x0000000000017b2d <+29>: mov $0x0,%rdi
0x0000000000017b34 <+36>: callq 0x17b39 <drm_dp_aux_dev_get_by_minor+41>
0x0000000000017b39 <+41>: mov 0x18(%rax),%edx <=========
0x0000000000017b3c <+44>: mov %rax,%r12
0x0000000000017b3f <+47>: lea 0x18(%rax),%rdi
0x0000000000017b43 <+51>: test %edx,%edx
0x0000000000017b45 <+53>: je 0x17b7a <drm_dp_aux_dev_get_by_minor+106>
0x0000000000017b47 <+55>: lea 0x1(%rdx),%ecx
0x0000000000017b4a <+58>: mov %edx,%eax
0x0000000000017b4c <+60>: lock cmpxchg %ecx,(%rdi)
0x0000000000017b50 <+64>: jne 0x17b76 <drm_dp_aux_dev_get_by_minor+102>
0x0000000000017b52 <+66>: test %edx,%edx
0x0000000000017b54 <+68>: js 0x17b6d <drm_dp_aux_dev_get_by_minor+93>
0x0000000000017b56 <+70>: test %ecx,%ecx
0x0000000000017b58 <+72>: js 0x17b6d <drm_dp_aux_dev_get_by_minor+93>
0x0000000000017b5a <+74>: mov $0x0,%rdi
0x0000000000017b61 <+81>: callq 0x17b66 <drm_dp_aux_dev_get_by_minor+86>
0x0000000000017b66 <+86>: mov %r12,%rax
0x0000000000017b69 <+89>: pop %r12
0x0000000000017b6b <+91>: pop %rbp
0x0000000000017b6c <+92>: retq
0x0000000000017b6d <+93>: xor %esi,%esi
0x0000000000017b6f <+95>: callq 0x17b74 <drm_dp_aux_dev_get_by_minor+100>
0x0000000000017b74 <+100>: jmp 0x17b5a <drm_dp_aux_dev_get_by_minor+74>
0x0000000000017b76 <+102>: mov %eax,%edx
0x0000000000017b78 <+104>: jmp 0x17b43 <drm_dp_aux_dev_get_by_minor+51>
0x0000000000017b7a <+106>: xor %r12d,%r12d
0x0000000000017b7d <+109>: jmp 0x17b5a <drm_dp_aux_dev_get_by_minor+74>
End of assembler dump.
(gdb) list *drm_dp_aux_dev_get_by_minor+0x29
0x17b39 is in drm_dp_aux_dev_get_by_minor (drivers/gpu/drm/drm_dp_aux_dev.c:65).
60 static struct drm_dp_aux_dev *drm_dp_aux_dev_get_by_minor(unsigned index)
61 {
62 struct drm_dp_aux_dev *aux_dev = NULL;
63
64 mutex_lock(&aux_idr_mutex);
65 aux_dev = idr_find(&aux_idr, index);
66 if (!kref_get_unless_zero(&aux_dev->refcount))
67 aux_dev = NULL;
68 mutex_unlock(&aux_idr_mutex);
69
(gdb) p/x &((struct drm_dp_aux_dev *)(0x0))->refcount
$8 = 0x18
Looking at the caller, checks on the minor are pushed down to
drm_dp_aux_dev_get_by_minor()
static int auxdev_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
struct drm_dp_aux_dev *aux_dev;
aux_dev = drm_dp_aux_dev_get_by_minor(minor); <====
if (!aux_dev)
return -ENODEV;
file->private_data = aux_dev;
return 0;
}
Fixes: e94cb37b34 ("drm/dp: Add a drm_aux-dev module for reading/writing dpcd registers.")
Cc: <stable@vger.kernel.org > # v4.6+
Signed-off-by: Zwane Mwaikambo <zwane@yosper.io >
Reviewed-by: Lyude Paul <lyude@redhat.com >
[added Cc to stable]
Signed-off-by: Lyude Paul <lyude@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.21.2010122231070.38717@montezuma.home
2020-10-15 13:58:54 -04:00
Christian König
ce65b87400
drm/ttm: nuke caching placement flags
...
Changing the caching on the fly never really worked
flawlessly.
So stop this completely and just let drivers specific the
desired caching in the tt or bus object.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com >
Link: https://patchwork.freedesktop.org/patch/394256/
2020-10-15 12:51:35 +02:00
Christian König
867bcecd6a
drm/ttm: use caching instead of placement for ttm_io_prot
...
Instead of the placement flags use the caching of the bus
mapping or tt object for the page protection flags.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com >
Link: https://patchwork.freedesktop.org/patch/394255/
2020-10-15 12:51:24 +02:00
Christian König
1cf65c4518
drm/ttm: add caching state to ttm_bus_placement
...
And implement setting it up correctly in the drivers.
This allows getting rid of the placement flags for this.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com >
Link: https://patchwork.freedesktop.org/patch/394254/
2020-10-15 12:51:13 +02:00
Christian König
1b4ea4c598
drm/ttm: set the tt caching state at creation time
...
All drivers can determine the tt caching state at creation time,
no need to do this on the fly during every validation.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com >
Link: https://patchwork.freedesktop.org/patch/394253/
2020-10-15 12:50:40 +02:00
Sumit Semwal
070c7fa58b
drm: panel: Add novatek nt36672a panel driver
...
Novatek NT36672a is a generic DSI IC that drives command and video mode
panels. Add the driver for it.
Right now adding support for some Poco F1 phones that have an LCD panel
from Tianma connected with this IC, with a resolution of 1080x2246 that
operates in DSI video mode.
During testing, Benni Steini <bennisteinir@gmail.com > helped us fix
the reset sequence timing (from 10ms to 20ms), to get the bootanimation
to work on Android.
With current AOSP, we need to increase it to 200ms - this seems to be a
safe high value to avoid a white screen occasionally.
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Benni Steini <bennisteinir@gmail.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200902064407.30712-3-sumit.semwal@linaro.org
2020-10-15 10:29:26 +05:30
Sumit Semwal
9528a02430
dt-bindings: display: panel: Add bindings for Novatek nt36672a
...
Novatek nt36672a is a display driver IC that can drive DSI panel. It
is also present in the Tianma video mode panel, which is a FHD+ panel
with a resolution of 1080x2246 and 6.18 inches size. It is found in
some of the Poco F1 phones.
This patch adds the display driver for the IC, with support added for
this tianma fhd video mode panel.
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org >
Reviewed-by: Rob Herring <robh@kernel.org >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Reviewed-by: Sam Ravnborg <sam@ravnborg.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20200902064407.30712-2-sumit.semwal@linaro.org
2020-10-15 10:29:25 +05:30
Andy Shevchenko
412ae84cb4
drm/virtio: Use UUID API for importing the UUID
...
There is import_uuid() function which imports u8 array to the uuid_t.
Use it instead of open coding variant.
This allows to hide the uuid_t internals.
Reviewed-by: David Stevens <stevensd@chromium.org >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20201013132714.70973-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-10-14 09:30:19 +02:00
Andy Shevchenko
8bca49e43f
drm: shmobile: Reduce include dependencies
...
This file doesn't need anything provided by <linux/kernel.h>.
All it needs are some types, which are provided by <drm/drm_mode.h>.
Drop unneeded <linux/kernel.h> completely.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20200422125201.37618-1-andriy.shevchenko@linux.intel.com
2020-10-13 17:15:43 +03:00
Maxime Ripard
a4e45e5d30
MAINTAINERS: Add myself as a maintainer for vc4
...
Eric isn't working on vc4 anymore and I've been working on it, as well as
merging patches for it, recently so let's make it official so I don't miss
patches.
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20201009074952.11345-1-maxime@cerno.tech
2020-10-13 08:57:47 +02:00
Randy Dunlap
bf296b3548
drm/aspeed: Fix Kconfig warning & subsequent build errors
...
Kernel test robot reported build errors (undefined references)
that didn't make much sense. After reproducing them, there is also
a Kconfig warning that is the root cause of the build errors, so
fix that Kconfig problem.
Fixes this Kconfig warning:
WARNING: unmet direct dependencies detected for CMA
Depends on [n]: MMU [=n]
Selected by [m]:
- DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=m] && OF [=y] && (COMPILE_TEST [=y] || ARCH_ASPEED) && HAVE_DMA_CONTIGUOUS [=y]
and these dependent build errors:
(.text+0x10c8c): undefined reference to `start_isolate_page_range'
microblaze-linux-ld: (.text+0x10f14): undefined reference to `test_pages_isolated'
microblaze-linux-ld: (.text+0x10fd0): undefined reference to `undo_isolate_page_range'
Fixes: 76356a966e ("drm: aspeed: Clean up Kconfig options")
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Joel Stanley <joel@jms.id.au >
Cc: Joel Stanley <joel@jms.id.au >
Cc: Andrew Jeffery <andrew@aj.id.au >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Mike Rapoport <rppt@linux.ibm.com >
Cc: linux-mm@kvack.org
Cc: linux-aspeed@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: David Airlie <airlied@linux.ie >
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Joel Stanley <joel@jms.id.au >
Link: https://patchwork.freedesktop.org/patch/msgid/20201011230131.4922-1-rdunlap@infradead.org
Signed-off-by: Joel Stanley <joel@jms.id.au >
2020-10-12 15:14:33 +10:30
Jyri Sarha
882bceffa8
drm/tilcdc: Remove tilcdc_crtc_max_width(), use private data
...
We already have a private data member for maximum display width so
let's use it and get rid of the redundant tilcdc_crtc_max_width().
The LCDC version probing is moved to before reading the device tree
properties so that the version information is available when private
data maximum width is initialized, if "max-width" property is not
found.
Signed-off-by: Jyri Sarha <jsarha@ti.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/73683d2ce151cffb811a756595b02892eeac3d84.1602349100.git.jsarha@ti.com
2020-10-10 20:02:14 +03:00
Jyri Sarha
b3a753f54a
drm/tilcdc: Do not keep vblank interrupts enabled all the time
...
END_OF_FRAME interrupts have been enabled all the time since the
beginning of this driver. It is about time to add this feature.
Signed-off-by: Jyri Sarha <jsarha@ti.com >
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: https://patchwork.freedesktop.org/patch/msgid/fb87adebaffe8c7cb4fe7e909a45d47af08d7c6e.1602349100.git.jsarha@ti.com
2020-10-10 20:02:06 +03:00
Simon Ser
ec5722adb8
drm/fourcc: document modifier uniqueness requirements
...
There have suggestions to bake pitch alignment, address alignment,
contiguous memory or other placement (hidden VRAM, GTT/BAR, etc)
constraints into modifiers. Last time this was brought up it seemed
like the consensus was to not allow this. Document this in drm_fourcc.h.
There are several reasons for this.
- Encoding all of these constraints in the modifiers would explode the
search space pretty quickly (we only have 64 bits to work with).
- Modifiers need to be unambiguous: a buffer can only have a single
modifier.
- Modifier users aren't expected to parse modifiers (except drivers).
v2: add paragraph about aliases (Daniel)
v3: fix unrelated changes sent with the patch
v4: disambiguate users between driver and higher-level programs (Brian,
Daniel)
v5: fix AFBC example (Brian, Daniel)
v6: remove duplicated paragraph (Daniel)
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Brian Starkey <brian.starkey@arm.com >
Cc: Daniel Stone <daniel@fooishbar.org >
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Cc: Dave Airlie <airlied@gmail.com >
Cc: Marek Olšák <maraeo@gmail.com >
Cc: Alex Deucher <alexdeucher@gmail.com >
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Michel Dänzer <michel@daenzer.net >
Link: https://patchwork.freedesktop.org/patch/msgid/MGwgeXojKNdNXjCxuMhRlwcJM4vdYph_WJcMeGPPGMcRKtHV41XAXlh2tCc-pPJZCAhS3gwbWMWTd8f03NBA2ZYKfr0QxLhcPivpopr5c6M=@emersion.fr
2020-10-09 11:39:19 +02:00
Thomas Zimmermann
178c72350d
drm/aspeed: Set driver CMA functions with DRM_GEM_CMA_DRIVER_OPS
...
DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver
to their defaults. No functional changes are made.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Joel Stanley <joel@jms.id.au >
Acked-by: Emil Velikov <emil.velikov@collabora.com >
Signed-off-by: Joel Stanley <joel@jms.id.au >
Link: https://patchwork.freedesktop.org/patch/msgid/20200603083132.4610-5-tzimmermann@suse.de
2020-10-09 19:14:12 +10:30
Maxime Ripard
351f950db4
drm/atomic: Pass the full state to CRTC atomic enable/disable
...
If the CRTC driver ever needs to access the full DRM state, it can't do so
at atomic_enable / atomic_disable time since drm_atomic_helper_swap_state
will have cleared the pointer from the struct drm_crtc_state to the struct
drm_atomic_state before calling those hooks.
In order to allow that, let's pass the full DRM state to atomic_enable and
atomic_disable. The conversion was done using the coccinelle script below,
built tested on all the drivers and actually tested on vc4.
virtual report
@@
struct drm_crtc_helper_funcs *FUNCS;
identifier dev, state;
identifier crtc, crtc_state;
@@
disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
{
<...
- FUNCS->atomic_disable(crtc, crtc_state);
+ FUNCS->atomic_disable(crtc, state);
...>
}
@@
struct drm_crtc_helper_funcs *FUNCS;
identifier dev, state;
identifier crtc, crtc_state;
@@
drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, struct drm_atomic_state *state)
{
<...
- FUNCS->atomic_enable(crtc, crtc_state);
+ FUNCS->atomic_enable(crtc, state);
...>
}
@@
identifier crtc, old_state;
@@
struct drm_crtc_helper_funcs {
...
- void (*atomic_enable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
+ void (*atomic_enable)(struct drm_crtc *crtc, struct drm_atomic_state *state);
...
- void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
+ void (*atomic_disable)(struct drm_crtc *crtc, struct drm_atomic_state *state);
...
}
@ crtc_atomic_func @
identifier helpers;
identifier func;
@@
(
static struct drm_crtc_helper_funcs helpers = {
...,
.atomic_enable = func,
...,
};
|
static struct drm_crtc_helper_funcs helpers = {
...,
.atomic_disable = func,
...,
};
)
@ ignores_old_state @
identifier crtc_atomic_func.func;
identifier crtc, old_state;
@@
void func(struct drm_crtc *crtc,
struct drm_crtc_state *old_state)
{
... when != old_state
}
@ adds_old_state depends on crtc_atomic_func && !ignores_old_state @
identifier crtc_atomic_func.func;
identifier crtc, old_state;
@@
void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state)
{
+ struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc);
...
}
@ depends on crtc_atomic_func @
identifier crtc_atomic_func.func;
expression E;
type T;
@@
void func(...)
{
...
- T state = E;
+ T crtc_state = E;
<+...
- state
+ crtc_state
...+>
}
@ depends on crtc_atomic_func @
identifier crtc_atomic_func.func;
type T;
@@
void func(...)
{
...
- T state;
+ T crtc_state;
<+...
- state
+ crtc_state
...+>
}
@ depends on crtc_atomic_func @
identifier crtc_atomic_func.func;
identifier old_state;
identifier crtc;
@@
void func(struct drm_crtc *crtc,
- struct drm_crtc_state *old_state
+ struct drm_atomic_state *state
)
{ ... }
@ include depends on adds_old_state @
@@
#include <drm/drm_atomic.h>
@ no_include depends on !include && adds_old_state @
@@
+ #include <drm/drm_atomic.h>
#include <drm/...>
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef142a0c13f7870.1602161031.git-series.maxime@cerno.tech
2020-10-09 09:55:59 +02:00
Ondrej Jirman
c76eb35587
drm: aspeed: Fix GENMASK misuse
...
Arguments to GENMASK should be msb >= lsb.
Signed-off-by: Ondrej Jirman <megous@megous.com >
Reviewed-by: Andrew Jeffery <andrew@aj.id.au >
Signed-off-by: Joel Stanley <joel@jms.id.au >
Link: https://patchwork.freedesktop.org/patch/msgid/20200222235152.242816-1-megous@megous.com
2020-10-09 18:16:34 +10:30
Joel Stanley
696029eb36
drm/aspeed: Add sysfs for output settings
...
These settings are used by an ASPEED BMC to determine when the host is
trying to drive the display over PCIe (vga_pw) and to switch the
output between PCIe and the internal graphics device (dac_mux).
The valid values for the dac mux are:
00: VGA mode (default, aka PCIe)
01: Graphics CRT (aka BMC internal graphics, this driver)
10: Pass through mode from video input port A
11: Pass through mode from video input port B
Values for the read-only vga password register are:
1: Host driving the display
0: Host not driving the display
Signed-off-by: Joel Stanley <joel@jms.id.au >
Reviewed-by: Andrew Jeffery <andrew@aj.id.au >
Link: https://patchwork.freedesktop.org/patch/msgid/20200916083413.777307-1-joel@jms.id.au
2020-10-09 11:48:33 +10:30
Christian König
82e1b93ad8
dma-buf: use struct_size macro
...
Instead of manually calculating the structure size.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/394252/
2020-10-08 15:39:36 +02:00