WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] cirrus_vga: reset lfb_addr after a pci config wr

To: Alexander Graf <agraf@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped
From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
Date: Tue, 14 Jun 2011 18:25:45 +0200
Cc: anthony.perard@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx, anthony@xxxxxxxxxxxxx, stefano.stabellini@xxxxxxxxxxxxx
Delivery-date: Tue, 14 Jun 2011 09:26:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DF7681F.6020104@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1307116614-11775-1-git-send-email-stefano.stabellini@xxxxxxxxxxxxx> <1307116614-11775-2-git-send-email-stefano.stabellini@xxxxxxxxxxxxx> <4DF7681F.6020104@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666
On 2011-06-14 15:54, Alexander Graf wrote:
> On 06/03/2011 05:56 PM, stefano.stabellini@xxxxxxxxxxxxx wrote:
>> From: Stefano Stabellini<stefano.stabellini@xxxxxxxxxxxxx>
>>
>> If the cirrus_vga PCI BAR is unmapped than we should not only reset
>> map_addr but also lfb_addr, otherwise we'll keep trying to map
>> the old lfb_addr in map_linear_vram.
> 
> The patch looks good to me, but I'd love to get an ack from someone who
> knows the cirrus code before committing it.
> 

I'm not claiming to be the cirrus expert, but I've just walked through
all this vga mapping stuff: patch is correct.

Acked-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>

> 
> Alex
> 
>> Signed-off-by: Stefano Stabellini<stefano.stabellini@xxxxxxxxxxxxx>
>> ---
>>   hw/cirrus_vga.c |    5 ++++-
>>   1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
>> index 722cac7..3c5043e 100644
>> --- a/hw/cirrus_vga.c
>> +++ b/hw/cirrus_vga.c
>> @@ -3088,8 +3088,11 @@ static void pci_cirrus_write_config(PCIDevice *d,
>>       CirrusVGAState *s =&pvs->cirrus_vga;
>>
>>       pci_default_write_config(d, address, val, len);
>> -    if (s->vga.map_addr&&  d->io_regions[0].addr == PCI_BAR_UNMAPPED)
>> +    if (s->vga.map_addr&&  d->io_regions[0].addr == PCI_BAR_UNMAPPED) {
>>           s->vga.map_addr = 0;
>> +        s->vga.lfb_addr = 0;
>> +        s->vga.lfb_end = 0;
>> +    }
>>       cirrus_update_memory_access(s);
>>   }
>>

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel