From owner-freebsd-arm@freebsd.org Tue Jul 21 10:09:43 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 848FB9A6EB3 for ; Tue, 21 Jul 2015 10:09:43 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F70B16D7 for ; Tue, 21 Jul 2015 10:09:43 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by iehx8 with SMTP id x8so58181442ieh.3 for ; Tue, 21 Jul 2015 03:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=sxcrZgjSXNUqAExPgjWM3SHVuRnt5IfFdutl8boOkMY=; b=Rae1dFkW7AuOqJaOC/5QiQqn+CSDhaCaX2/oFjoJDN/LxNWghBc735AkgMPM9Ffmo6 ImP0pG3m8z2cKhHyIx4xUTehPX8gRXteslD2SifDOqL/1McBjvqCUt2DN9+XiazHamTV 2qUFdlaa6k/oU1W3NnnR5+3dlHnp9NySQ4TxixCzbphwkXSaXaAxVxcKpB3G1SUO3TIg woEXKZDauGE7EKh+S/5N9pCIpdqYTSn4uPhGLo7sHWcjckmSLeN7Oh9ERmBequmaMmXM TAKBsSH96yOmdZONGVfFYl7NMmbwxkfTXDBTcn9r/ASyGZRvasIp35tdoMOJyaTaZefh 7Tgw== MIME-Version: 1.0 X-Received: by 10.107.47.26 with SMTP id j26mr44314142ioo.17.1437473382699; Tue, 21 Jul 2015 03:09:42 -0700 (PDT) Received: by 10.64.148.84 with HTTP; Tue, 21 Jul 2015 03:09:42 -0700 (PDT) In-Reply-To: References: <5569347D-EA8B-46C9-97D3-6BF7CC1952B8@bluezbox.com> <14BBEBB2-E77E-45BC-89C1-1BE59D0871E6@bluezbox.com> Date: Tue, 21 Jul 2015 12:09:42 +0200 Message-ID: Subject: Re: WIP: IPU and HDMI drivers for i.MX6 From: Svatopluk Kraus To: =?UTF-8?Q?Mika=C3=ABl_Urankar?= Cc: Oleksandr Tymoshenko , "freebsd-arm@freebsd.org List" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 10:09:43 -0000 On Tue, Jul 21, 2015 at 10:04 AM, Mika=C3=ABl Urankar wrote: > 2015-07-20 22:43 GMT+02:00 Oleksandr Tymoshenko : >> Looks like i4pro has two IPU enabled and my code does not handle >> this case well yet. New patch has hack that make sure only IPU1 is attac= hed. >> >> https://people.freebsd.org/~gonzo/arm/patches/imx6-ipu-hdmi-20150720.dif= f > > It works now: > http://mikael.urankar.free.fr/FreeBSD/cubox_hdmi_20150720.txt > > I have these warnings in the console when I shutdown X: > WARNING: A device driver has set "memattr" inconsistently When I played with gonzo's BBB wip patches some time ago, I got same messages. My proof-of-concept hack was to return correct memory attribute of frame buffer (it was VM_MEMATTR_UNCACHEABLE) thru argument passed to fb_mmap() in sys/dev/fb/fbd.c file. --- a/sys/dev/fb/fbd.c +++ b/sys/dev/fb/fbd.c @@ -173,6 +173,8 @@ fb_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, if (info->fb_flags & FB_FLAG_NOMMAP) return (ENODEV); +*memattr =3D VM_MEMATTR_UNCACHEABLE; + if (offset >=3D 0 && offset < info->fb_size) { if (info->fb_pbase =3D=3D 0) *paddr =3D vtophys((uint8_t *)info->fb_vbase + offs= et); Svata