Hi Tomi,
I hope you (or someone else on this list) can help me find the problem in this code.
I am working on a kernel framework for HDMI CEC (see https://lwn.net/Articles/680942/).
In order to get as much experience with different devices as possible I am trying to
implement it on my omap4430 Pandaboard. The big problem I am facing is that the CEC
interrupts come in through the HDMI_IRQ_CORE interrupt, and that just refuses to
trigger.
The code below adds support for this core interrupt and …
[View More]it is supposed to trigger it
using the Software Induced interrupt to keep the code as simple as possible.
On boot I get this debug line from the pr_info in my code:
irqstat 02000000 wp_irq 06000001 raw 20010000 intr_state 00000001 intr1 00000080 unmask1 00000080 intr_ctrl 0000000a
As far as I can see everything looks perfectly fine, except for the fact that bit 0
of the irqstat is stubbornly 0.
This is using kernel 4.5 with only this patch applied.
What am I missing?
The reward for the right answer will be HDMI CEC support for omap4 (and any other TI device
with the same CEC IP).
Regards,
Hans
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
index 7103c65..999b5ec 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
@@ -75,6 +75,14 @@ static irqreturn_t hdmi_irq_handler(int irq, void *data)
irqstatus = hdmi_wp_get_irqstatus(wp);
hdmi_wp_set_irqstatus(wp, irqstatus);
+ pr_info("irqstat %08x wp_irq %08x raw %08x intr_state %08x intr1 %08x unmask1 %08x intr_ctrl %08x\n",
+ irqstatus,
+ hdmi_read_reg(hdmi.wp.base, HDMI_WP_IRQENABLE_SET),
+ hdmi_read_reg(hdmi.wp.base, HDMI_WP_IRQSTATUS_RAW),
+ hdmi_read_reg(hdmi.core.base, HDMI_CORE_SYS_INTR_STATE),
+ hdmi_read_reg(hdmi.core.base, HDMI_CORE_SYS_INTR1),
+ hdmi_read_reg(hdmi.core.base, HDMI_CORE_SYS_INTR_UNMASK1),
+ hdmi_read_reg(hdmi.core.base, HDMI_CORE_SYS_INTR_CTRL));
if ((irqstatus & HDMI_IRQ_LINK_CONNECT) &&
irqstatus & HDMI_IRQ_LINK_DISCONNECT) {
/*
@@ -94,6 +102,13 @@ static irqreturn_t hdmi_irq_handler(int irq, void *data)
} else if (irqstatus & HDMI_IRQ_LINK_DISCONNECT) {
hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_LDOON);
}
+ if (irqstatus & HDMI_IRQ_CORE) {
+ u32 intr1 = hdmi_read_reg(hdmi.core.base, HDMI_CORE_SYS_INTR1);
+
+ hdmi_write_reg(hdmi.core.base, HDMI_CORE_SYS_INTR_CTRL, 2);
+ pr_info("clear sw irq\n");
+ hdmi_write_reg(hdmi.core.base, HDMI_CORE_SYS_INTR1, intr1);
+ }
return IRQ_HANDLED;
}
@@ -222,9 +237,12 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
if (r)
goto err_mgr_enable;
+ hdmi_write_reg(hdmi.core.base, HDMI_CORE_SYS_INTR_UNMASK1, 0x80);
hdmi_wp_set_irqenable(wp,
- HDMI_IRQ_LINK_CONNECT | HDMI_IRQ_LINK_DISCONNECT);
+ HDMI_IRQ_LINK_CONNECT | HDMI_IRQ_LINK_DISCONNECT | HDMI_IRQ_CORE);
+ pr_info("set sw irq\n");
+ hdmi_write_reg(hdmi.core.base, HDMI_CORE_SYS_INTR_CTRL, 0xa);
return 0;
err_mgr_enable:
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=94443
Bug ID: 94443
Summary: Compilation libva , No package 'libdrm' found
Product: DRI
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: General
Assignee: dri-devel(a)lists.freedesktop.org
Reporter: swojskichlopak(a)wp.pl
I'm trying compile libva …
[View More]32bit on 64 bit system
and from ./configure command:
#---------------------------
...
configure: error: Package requirements (libdrm >= 2.4) were not met:
No package 'libdrm' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables DRM_CFLAGS
and DRM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
#---------------------------
#------------------
$ cat /usr/lib/pkgconfig/libdrm.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=/usr/lib
includedir=/usr/include
Name: libdrm
Description: Userspace interface to kernel DRM services
Version: 2.4.66
Libs: -L${libdir} -ldrm
Cflags: -I${includedir} -I${includedir}/libdrm
#------------------
#--------
$ ls /usr/lib/*drm*
/usr/lib/libdrm_amdgpu.so@ /usr/lib/libdrm_nouveau.so.1.0.0*
/usr/lib/libdrm_amdgpu.so.1@ /usr/lib/libdrm_radeon.so@
/usr/lib/libdrm_amdgpu.so.1.0.0* /usr/lib/libdrm_radeon.so.1@
/usr/lib/libdrm_intel.so@ /usr/lib/libdrm_radeon.so.1.0.1*
/usr/lib/libdrm_intel.so.1@ /usr/lib/libdrm.so@
/usr/lib/libdrm_intel.so.1.0.0* /usr/lib/libdrm.so.2@
/usr/lib/libdrm_nouveau.so@ /usr/lib/libdrm.so.2.4.0*
/usr/lib/libdrm_nouveau.so.1@
#--------
If is something wrong with configure (I dont know)
how use DRM_CFLAGS ?
I tried
#-----------
./configure --disable-static --enable-glx \
--libdir=/usr/lib \
--bindir=/usr/bin32 \
DRM_CFLAGS=/usr/lib \
--includedir=/usr/include
#-----------
but not working.
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
On Fri, Apr 8, 2016 at 6:00 PM, Andy Shevchenko
<andriy.shevchenko(a)linux.intel.com> wrote:
> On Fri, 2016-04-08 at 09:27 +0800, Huang, Ying wrote:
>> Andy Shevchenko <andriy.shevchenko(a)linux.intel.com> writes:
>>
>> >
>> > On Fri, 2016-02-26 at 16:11 +0200, Andy Shevchenko wrote:
>> > >
>> > > On Thu, 2016-02-18 at 01:03 +0100, Rafael J. Wysocki wrote:
>> > > >
>> > > >
>> > > > …
[View More]On Wednesday, February 17, 2016 02:17:24 PM Andy Shevchenko
>> > > > wrote:
>> > > > >
>> > > > >
>> > > > > Switch to use a generic UUID API instead of custom approach.
>> > > > > It
>> > > > > allows to
>> > > > > define UUIDs, compare them, and validate.
>> > > []
>> > >
>> > Summon initial author of the UUID library.
>> >
>> > Summary: the API of comparison functions is rather strange. What the
>> > point to not take pointers directly? (Moreover I hope compiler too
>> > clever not to make a copy of constant arguments there)
>> >
>> > I could only imagine the case you are trying to avoid temporary
>> > variables for constants like NULL_UUID.
>> >
>> > Issue with this is the ugliness in the users of that, in
>> > particularly
>> > present in ACPI (drivers/acpi/apei/ghes.c).
>> >
>> > I would like to have more clear interface for that. Perhaps we may
>> > add
>> > something like
>> >
>> > cmp_p(pointer, non-pointer);
>> > cmp_pp(pointer, pointer);
>> >
>> > to not break existing API for now.
>> >
>> > It would be useful for many cases in the kernel.
>> You can take a look at the drivers/acpi/apei/erst.c for uuid_le_cmp
>> usage.
>>
>> #define
>> CPER_CREATOR_PSTORE \
>> UUID_LE(0x75a574e3, 0x5052, 0x4b29, 0x8a, 0x8e, 0xbe,
>> 0x2c, \
>> 0x64, 0x90, 0xb8, 0x9d)
>>
>> if (uuid_le_cmp(rcd->hdr.creator_id, CPER_CREATOR_PSTORE) !=
>> 0)
>> goto skip;
>>
>> Looks better?
>
> I don't quite understand the issues with
>
> if (uuid_le_cmp(&rcd->hdr.creator_id, &CPER_CREATOR_PSTORE) != 0)
I tried to make uuid_le looks like a primitive data type and UUID
constant looks like primitive type constants if possible. If we can
define data as uuid_le/be, then it will look just like that. But if
there are too many places we cannot use uuid_le/be directly, I am OK
to convert the interface to use pointer instead.
> or, like I mentioned previously, we may introduce _cmp_p() and use like
>
> if (uuid_le_cmp_p(&rcd->hdr.creator_id, CPER_CREATOR_PSTORE) != 0)
Personally, I don't like this interface. It is better for two
parameters to have same data type.
> if it looks better (again, I don't know if compiler is going to copy the last argument).
>
>>
>> This is the typical use case in mind when I write the uuid.h.
>>
>> As for uuid_le_cmp usage in drivers/acpi/apei/ghes.c,
>>
>> if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
>> CPER_SEC_PLATFORM_MEM)) {
>
> Ditto
>
> if (!uuid_le_cmp_p((uuid_le *)gdata->section_type,
> CPER_SEC_PLATFORM_MEM)) {
>
>>
>> The code looks not good mainly because acpi_hest_generic_data is not
>> defined with uuid_le in mind.
>>
>> struct acpi_hest_generic_data {
>> u8 section_type[16];
>> u32 error_severity;
>> u16 revision;
>> u8 validation_bits;
>> u8 flags;
>> u32 error_data_length;
>> u8 fru_id[16];
>> u8 fru_text[20];
>> };
>>
>> If section_type was defined as uuid_le instead of u8[16], the
>> uuid_le_cmp usage would look better. So I suggest to use uuid_le/be
>> in
>> data structure definition in new code if possible.
>
> This is understandable for such structures, but we might get a UUID from
> a buffer which is pointer to u8. It's not possible to convert to uuid_*
> since it's too generic stuff and might require to introduce
> ACPI_TYPE_UUID with standardization and all necessary work. Apparently
> not the shortest way.
If this is just a special case that happens seldom, we can just work
around it with *(uuid_le/be *)buf. If it is common, we can change the
interface or add a new interface.
Best Regards,
Huang, YIng
>> >
>> > >
>> > > >
>> > > >
>> > > > >
>> > > > >
>> > > > > +static const uuid_le ads_uuid =
>> > > > > + UUID_LE(0xdbb8e3e6, 0x5886, 0x4ba6,
>> > > > > + 0x87, 0x95, 0x13, 0x19, 0xf5, 0x2a, 0x96,
>> > > > > 0x6b);
>> > > > >
>> > > > > static bool acpi_enumerate_nondev_subnodes(acpi_handle scope,
>> > > > > const union
>> > > > > acpi_object
>> > > > > *desc,
>> > > > > @@ -138,7 +136,7 @@ static bool
>> > > > > acpi_enumerate_nondev_subnodes(acpi_handle scope,
>> > > > > || links->type != ACPI_TYPE_PACKAGE)
>> > > > > break;
>> > > > >
>> > > > > - if (memcmp(uuid->buffer.pointer, ads_uuid,
>> > > > > sizeof(ads_uuid)))
>> > > > > + if (uuid_le_cmp(*(uuid_le *)uuid-
>> > > > > >buffer.pointer,
>> > > > > ads_uuid))
>> > > > Maybe it's too late, but I don't quite understand the pointer
>> > > > manipulations here.
>> > > >
>> > > > I can see why you need a type conversion (although it looks
>> > > > ugly),
>> > > > but why do you
>> > > > need to dereference it too?
>> > > The function takes that kind of type on input. The other variants
>> > > are
>> > > not compiled.
>> > > Perhaps we better change uuid_{lb}e_cmp() first to take normal
>> > > pointers, though I think the initial idea was to get type checking
>> > > at
>> > > compile time.
>> > >
>
> --
> Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
> Intel Finland Oy
>
[View Less]
Hi Dave,
A few fixes and cleanups for 4.7 that's been collecting dust in my
inbox for a while.
Thanks
Patrik
The following changes since commit d00b39c17573ece6f5fb1385314877d29f540db8:
Merge branch 'drm-next-analogix-dp-v2' of
github.com:yakir-Yang/linux into drm-next (2016-04-06 09:57:33 +1000)
are available in the git repository at:
git://github.com/patjak/drm-gma500 gma500-next
for you to fetch changes up to 7d323264bec07cd71df47333c6cd8f6b36987821:
drm/gma500/mdfld_dsi: …
[View More]remove bogus if check (2016-04-08 13:42:31 +0200)
----------------------------------------------------------------
Alan (1):
drm/gma500/mdfld_dsi: remove bogus if check
Itai Handler (1):
drm/gma500: Fix possible out of bounds read
Sudip Mukherjee (1):
drm/gma500: fix double freeing
drivers/gpu/drm/gma500/framebuffer.c | 13 ++++---------
drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 6 +-----
drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 2 +-
3 files changed, 6 insertions(+), 15 deletions(-)
[View Less]
https://bugzilla.kernel.org/show_bug.cgi?id=115911
Jan Prunk <janprunk(a)gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janprunk(a)gmail.com
--- Comment #5 from Jan Prunk <janprunk(a)gmail.com> ---
Created attachment 212141
--> https://bugzilla.kernel.org/attachment.cgi?id=212141&action=edit
This is the camera …
[View More]screenshot of the failed kernel boot
This is the camera screenshot of the failed kernel boot.
I couldn't figure out another way of submitting the dmesg output.
--
You are receiving this mail because:
You are watching the assignee of the bug.
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Bug ID: 94705
Summary: [radeonsi] blue ground in Company of Heroes 2
Product: Mesa
Version: git
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: dri-devel(a)lists.freedesktop.org
Reporter: lordheavym(a)gmail.com
QA Contact: …
[View More]dri-devel(a)lists.freedesktop.org
Created attachment 122566
--> https://bugs.freedesktop.org/attachment.cgi?id=122566&action=edit
battlefield with some blue ground
* radeon Tonga (was the same with Pitcairn)
* kernel 4.5.0
* mesa-git 511ce29
* llvm-svn r264392
Please note that it isn't a regression, this bug is present since the release
of the game for Linux
Here is the link to an apitrace:
https://drive.google.com/file/d/0B1WCo3k21FK3NW9DaGZpR1cxWjA/view?usp=shari…
--
You are receiving this mail because:
You are the assignee for the bug.
[View Less]
Since first version:
- Add "drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ function"
- This is actually an independent fix (see patch description)
- Add "drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop()"
- Wait for LCDC_FRAME_DONE before reseting the LCDC
- Fix typo in description
- Use system work queue
- Check DPMS state after drm_modeset_lock_crtc() has been taken
Jyri Sarha (3):
drm/tilcdc: Write to LCDC_END_OF_INT_IND_REG at the end of IRQ
function
…
[View More]drm/tilcdc: Move waiting of LCDC_FRAME_DONE IRQ into stop()
drm/tilcdc: Recover from sync lost error flood by resetting the LCDC
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 83 +++++++++++++++++++++++++-----------
1 file changed, 58 insertions(+), 25 deletions(-)
--
1.9.1
[View Less]