1.1 --- a/pkg/devices/display/src/ci20/display-ci20_hdmi.cc Sat Jun 10 23:59:44 2023 +0200
1.2 +++ b/pkg/devices/display/src/ci20/display-ci20_hdmi.cc Sun Jun 11 15:42:11 2023 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Export MIPS Creator CI20 HDMI display operations as a server.
1.6 *
1.7 - * Copyright (C) 2018, 2020, 2021 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2018, 2020, 2021, 2023 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -29,10 +29,13 @@
1.13
1.14 #include <ipc/irq.h>
1.15 #include <ipc/server.h>
1.16 +
1.17 #include "activation_server.h"
1.18 #include "cpm_client.h"
1.19 #include "icu_client.h"
1.20
1.21 +
1.22 +
1.23 /* Virtual addresses for the HDMI register block plus interrupt capability. */
1.24
1.25 static l4_addr_t hdmi_virt_base = 0, hdmi_virt_base_end = 0;
1.26 @@ -101,7 +104,7 @@
1.27
1.28 /* Display device. */
1.29
1.30 -class server_DisplayObject : public Activation
1.31 +class DisplayObject_server : public Activation
1.32 {
1.33 public:
1.34 /* Switch the display off. */
1.35 @@ -132,18 +135,17 @@
1.36
1.37 int main(void)
1.38 {
1.39 - if (setup_memory()) return 1;
1.40 + if (setup_memory())
1.41 + return 1;
1.42
1.43 /* Initialise and register a new server object. */
1.44
1.45 - server_DisplayObject obj;
1.46 - l4_cap_idx_t server;
1.47 + DisplayObject_server obj;
1.48
1.49 - if (ipc_server_bind("display", (l4_umword_t) &obj, &server)) return 1;
1.50 + /* Bind and start the IPC server loop. */
1.51
1.52 - /* Enter the IPC server loop. */
1.53 + if (ipc_server_loop_for(Activation, &obj, "display"))
1.54 + return 1;
1.55
1.56 - ipc_server_loop(Activation_expected_items, &obj,
1.57 - (ipc_server_handler_type) handle_Activation);
1.58 return 0;
1.59 }