All the bit operations (such as find_first_zero_bit()) read sizeof(long) bytes
at a time. If we allocated less than sizeof(long) bytes for the bitmask we
would be accessing invalid memory when working with the bitmask.
Change the allocator to allocate sizeof(long) multiples for the bitmask.
Signed-off-by: Sasha Levin <sasha.levin(a)oracle.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_pasid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/…
[View More]kfd_pasid.c b/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c
index 2458ab7..71699ad 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c
@@ -32,8 +32,7 @@ int kfd_pasid_init(void)
{
pasid_limit = max_num_of_processes;
- pasid_bitmap = kzalloc(DIV_ROUND_UP(pasid_limit, BITS_PER_BYTE),
- GFP_KERNEL);
+ pasid_bitmap = kzalloc(BITS_TO_LONGS(pasid_limit), GFP_KERNEL);
if (!pasid_bitmap)
return -ENOMEM;
--
2.1.0
[View Less]
Hello Ben Goz,
The patch 241f24f82363: "amdkfd: Add packet manager module" from Jul
17, 2014, leads to the following static checker warning:
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c:357 pm_send_set_resources()
error: potentially using uninitialized 'packet'.
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
344 int pm_send_set_resources(struct packet_manager *pm,
345 struct scheduling_resources *res)
346 {
347 struct …
[View More]pm4_set_resources *packet;
348
349 BUG_ON(!pm || !res);
350
351 pr_debug("kfd: In func %s\n", __func__);
352
353 mutex_lock(&pm->lock);
354 pm->priv_queue->acquire_packet_buffer(pm->priv_queue,
355 sizeof(*packet) / sizeof(uint32_t),
356 (unsigned int **)&packet);
If we added error handling to ->acquire_packet_buffer() or if that
function set packet to NULL on error, either one of those would silence
this static checker warning (from pre-release Smatch checks).
357 if (packet == NULL) {
358 mutex_unlock(&pm->lock);
359 pr_err("kfd: failed to allocate buffer on kernel queue\n");
360 return -ENOMEM;
361 }
362
regards,
dan carpenter
[View Less]
We found Freescale imx6 and Rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS)
use the interface compatible Designware HDMI IP, but they also have some
lightly differences, such as phy pll configuration, register width(imx hdmi
register is one byte, but rk3288 is 4 bytes width and can only be accessed
by word), 4K support(imx6 doesn't support 4k, but rk3288 does), and HDMI2.0
support.
To reuse the imx-hdmi driver, we make this patch set:
(1): fix some CodingStyle warning to make checkpatch happy
…
[View More](2): convert imx-hdmi to drm_bridge
(3): split platform specific code
(4): move imx-hdmi to bridge/dw_hdmi
(5): extend dw_hdmi.c to support rk3288 hdmi
(6): add rockchip rk3288 platform specific code dw_hdmi-rockchip.c
Changes in v16:
- use the common binding for the clocks
- describe ddc-i2c-bus as optional
Changes in v15:
- add prefix dw_hdmi/DW_HDMI for public used dw_hdmi structs
adviced by Philipp Zabel
- remove THIS_MODULE in platform driver
- remove unio of the multi-byte register access, adviced by Philipp Zabel
- remove THIS_MODULE in platform driver
Changes in v14:
- add defer probing, adviced by Philipp Zabel
- remove drm_connector_register, because imx-drm core has registered
connector
Changes in v13:
- patch against drm-next
- split platform specific phy configuration
- split phy configuration from patch#4
Changes in v12:
- refactor of_node_put(ddc_node)
- squash patch <convert dw_hdmi to drm_bridge>
- add comment for the depend on patch
Changes in v11:
- squash patch <split some phy configuration to platform driver>
Changes in v10:
- split generic dw_hdmi.c improvements from patch#11 (add rk3288 support)
- add more display mode support mpll configuration for rk3288
Changes in v9:
- move some phy configuration to platform driver
Changes in v8:
- correct some spelling mistake
- modify ddc-i2c-bus and interrupt description
- Add documentation for rockchip dw hdmi
Changes in v7:
- remove unused variables from structure dw_hdmi
- remove a wrong modification
- add copyrights for dw_hdmi-imx.c
Changes in v6:
- rearrange the patch order
- refactor register access without reg_shift
Changes in v5:
- refactor reg-io-width
Changes in v4:
- fix checkpatch CHECK
- defer probe ddc i2c adapter
Changes in v3:
- split multi-register access to one indepent patch
Andy Yan (12):
drm: imx: imx-hdmi: make checkpatch happy
drm: imx: imx-hdmi: return defer if can't get ddc i2c adapter
drm: imx: imx-hdmi: convert imx-hdmi to drm_bridge mode
drm: imx: imx-hdmi: split phy configuration to platform driver
drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi
dt-bindings: add document for dw_hdmi
drm: bridge/dw_hdmi: add support for multi-byte register width access
drm: bridge/dw_hdmi: add mode_valid support
drm: bridge/dw_hdmi: clear i2cmphy_stat0 reg in hdmi_phy_wait_i2c_done
drm: bridge/dw_hdmi: add function dw_hdmi_phy_enable_spare
dt-bindings: Add documentation for rockchip dw hdmi
drm: bridge/dw_hdmi: add rockchip rk3288 support
.../devicetree/bindings/drm/bridge/dw_hdmi.txt | 45 ++
.../devicetree/bindings/video/dw_hdmi-rockchip.txt | 46 ++
drivers/gpu/drm/bridge/Kconfig | 5 +
drivers/gpu/drm/bridge/Makefile | 1 +
.../gpu/drm/{imx/imx-hdmi.c => bridge/dw_hdmi.c} | 711 ++++++++++-----------
.../gpu/drm/{imx/imx-hdmi.h => bridge/dw_hdmi.h} | 4 +-
drivers/gpu/drm/imx/Kconfig | 1 +
drivers/gpu/drm/imx/Makefile | 2 +-
drivers/gpu/drm/imx/dw_hdmi-imx.c | 247 +++++++
drivers/gpu/drm/rockchip/Kconfig | 10 +
drivers/gpu/drm/rockchip/Makefile | 2 +
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 321 ++++++++++
include/drm/bridge/dw_hdmi.h | 60 ++
13 files changed, 1074 insertions(+), 381 deletions(-)
create mode 100644 Documentation/devicetree/bindings/drm/bridge/dw_hdmi.txt
create mode 100644 Documentation/devicetree/bindings/video/dw_hdmi-rockchip.txt
rename drivers/gpu/drm/{imx/imx-hdmi.c => bridge/dw_hdmi.c} (73%)
rename drivers/gpu/drm/{imx/imx-hdmi.h => bridge/dw_hdmi.h} (99%)
create mode 100644 drivers/gpu/drm/imx/dw_hdmi-imx.c
create mode 100644 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
create mode 100644 include/drm/bridge/dw_hdmi.h
--
1.9.1
[View Less]
Hi Dave,
Fixes for 3.20. I did stick the gen3/4 reset work from Ville in because we
have an awful lot of gen4 mesa hangs, and with this reset should also work
on vintage i965g/gm (we already have reset for g4x/gen4.5). So should help
to appease users suffering from these hangs. Otherwise all over.
This is the last 3.20 pull from me, from here on Jani will take over.
Cheers, Daniel
The following changes since commit 4fcd01d0f34645710ac92d5523e26019428b0806:
drm: rcar-du: Fix NULL encoder …
[View More]pointer dereference (2014-12-03 08:28:48 +1000)
are available in the git repository at:
git://anongit.freedesktop.org/drm-intel tags/drm-intel-next-fixes-2014-12-04
for you to fetch changes up to 00f0b3781028605910cb4662a0f8a4849b445fc2:
drm/i915: Reject modeset when the same digital port is used more than once (2014-12-03 09:31:53 +0100)
----------------------------------------------------------------
Akash Goel (1):
drm/i915/skl: Update in Gen9 multi-engine forcewake range
Chris Wilson (1):
drm/i915: Only warn the first time we attempt to mmio whilst suspended
Clint Taylor (1):
drm/i915/chv: Enable AVI, SPD and HDMI infoframes for CHV.
Daniel Vetter (4):
drm/i915: Disallow pin ioctl completely for kms drivers
drm/i915: Stop gathering error states for CS error interrupts
drm/i915: Handle runtime pm in the CRC setup code
drm/i915: Tune down spurious CRC interrupt warning
Egbert Eich (1):
drm/i915/eDP: When enabling panel VDD cancel pending disable worker
Imre Deak (1):
drm/i915: mask RPS IRQs properly when disabling RPS
Thomas Daniel (1):
drm/i915: Fix context object leak for legacy contexts
Ville Syrjälä (8):
drm/i915: Don't clobber crtc->new_config when nothing changes
drm/i915: Fix gen4 GPU reset
drm/i915: Restore the display config after a GPU reset on gen4
drm/i915: Implement GPU reset for 915/945
drm/i915: Implement GPU reset for g33
drm/i915: Grab modeset locks for GPU rest on pre-ctg
drm/i915: Disable crtcs gracefully before GPU reset on gen3/4
drm/i915: Reject modeset when the same digital port is used more than once
drivers/gpu/drm/i915/i915_debugfs.c | 5 ++
drivers/gpu/drm/i915/i915_gem.c | 15 ++--
drivers/gpu/drm/i915/i915_irq.c | 59 +++++++-------
drivers/gpu/drm/i915/i915_reg.h | 3 +-
drivers/gpu/drm/i915/intel_display.c | 151 ++++++++++++++++++++++++++++++-----
drivers/gpu/drm/i915/intel_dp.c | 1 +
drivers/gpu/drm/i915/intel_drv.h | 3 +-
drivers/gpu/drm/i915/intel_hdmi.c | 7 ++
drivers/gpu/drm/i915/intel_uncore.c | 79 +++++++++---------
9 files changed, 230 insertions(+), 93 deletions(-)
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
[View Less]
Hi Dave -
Silence some pch fifo underrun reports and panel locking backtraces,
both cc: stable.
BR,
Jani.
The following changes since commit 009d0431c3914de64666bec0d350e54fdd59df6a:
Linux 3.18-rc7 (2014-11-30 16:42:27 -0800)
are available in the git repository at:
git://anongit.freedesktop.org/drm-intel tags/drm-intel-fixes-2014-12-04
for you to fetch changes up to b0616c5306b342ceca07044dbc4f917d95c4f825:
drm/i915: Unlock panel even when LVDS is disabled (2014-12-02 15:18:29 +…
[View More]0200)
----------------------------------------------------------------
Daniel Vetter (2):
drm/i915: More cautious with pch fifo underruns
drm/i915: Unlock panel even when LVDS is disabled
drivers/gpu/drm/i915/intel_display.c | 2 --
drivers/gpu/drm/i915/intel_lvds.c | 22 +++++++++++-----------
2 files changed, 11 insertions(+), 13 deletions(-)
--
Jani Nikula, Intel Open Source Technology Center
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=73338
--- Comment #62 from Alex Deucher <alexdeucher(a)gmail.com> ---
With the latest bugs noticed by Oleg fixed, smc fan control seems to work well
on CI parts so I've enabled it by default. smc fan control on SI is still not
working yet, but it's probably something small. You can test it on my 3.19-wip
branch.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugs.freedesktop.org/show_bug.cgi?id=73338
--- Comment #61 from Alex Deucher <alexdeucher(a)gmail.com> ---
Good catch. Fix pushed to my 3.19-wip branch.
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugs.freedesktop.org/show_bug.cgi?id=73338
--- Comment #60 from Chernovsky Oleg <adonai(a)xaker.ru> ---
(In reply to Alex Deucher from comment #59)
> I also noticed a minor error in the RPM control setup, and I've pushed a
> patch to my 3.19-wip branch.
I (think I) found another typo, that was tricky one to notice :D
> tmp = RREG32_SMC(CG_FDO_CTRL2) & FDO_PWM_MODE_MASK;
> tmp |= FDO_PWM_MODE(mode);
> WREG32_SMC(CG_FDO_CTRL2, tmp);
bitwise not (~) is missing …
[View More]from the first line
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]